diff options
author | Paul Brook <paul@codesourcery.com> | 2004-04-08 18:26:09 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-04-08 18:26:09 +0000 |
commit | d4453b7ac50559127a64a0ee001918a8456cba54 (patch) | |
tree | 975bc90ebcfbd9e00b4fc643af4ffb7ff6029bf9 /gcc/explow.c | |
parent | c00e272ed3f6c7cb31b9f6777a9f0753ed414340 (diff) | |
download | gcc-d4453b7ac50559127a64a0ee001918a8456cba54.zip gcc-d4453b7ac50559127a64a0ee001918a8456cba54.tar.gz gcc-d4453b7ac50559127a64a0ee001918a8456cba54.tar.bz2 |
explow.c (promote_mode): Use PROMOTE_FUNCTION_MODE instead of PROMOTE_FOR_CALL_ONLY.
* explow.c (promote_mode): Use PROMOTE_FUNCTION_MODE instead of
PROMOTE_FOR_CALL_ONLY.
* config/arm/arm-protos.h (arm_function_value): Declare.
* config/arm/arm.h (TARGET_PROMOTE_FUNCTION_ARGS): Define.
(TARGET_PROMOTE_PROTOTYPES): Return false.
(arm_function_value): New function.
* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Define.
(FUNCTION_VALUE): Call arm_function_value.
* config/cris/cris.h (PROMOTE_MODE): Rename ...
(PROMOTE_FUNCTION_MODE): ... to this.
(PROMOTE_FOR_CALL_ONLY): Remove.
* config/mmix/mmix.h: Likewise.
* config/s390/s390.h: Likewise.
* config/sparc/sparc.h: Likewise.
* config/sparc/sparc.c: Update comments about PROMOTE_MODE.
* doc/tm.texi (PROMOTE_FUNCTION_MODE): Document.
(TARGET_PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_RETURN): Update.
(PROMOTE_FOR_CALL_ONLY): Remove.
From-SVN: r80518
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 1eec943..1629fa8 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -799,6 +799,10 @@ copy_to_suggested_reg (rtx x, rtx target, enum machine_mode mode) FOR_CALL is nonzero if this call is promoting args for a call. */ +#if defined(PROMOTE_MODE) && !defined(PROMOTE_FUNCTION_MODE) +#define PROMOTE_FUNCTON_MODE PROMOTE_MODE +#endif + enum machine_mode promote_mode (tree type, enum machine_mode mode, int *punsignedp, int for_call ATTRIBUTE_UNUSED) @@ -806,17 +810,28 @@ promote_mode (tree type, enum machine_mode mode, int *punsignedp, enum tree_code code = TREE_CODE (type); int unsignedp = *punsignedp; -#ifdef PROMOTE_FOR_CALL_ONLY +#ifndef PROMOTE_MODE if (! for_call) return mode; #endif switch (code) { -#ifdef PROMOTE_MODE +#ifdef PROMOTE_FUNCTION_MODE case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: case CHAR_TYPE: case REAL_TYPE: case OFFSET_TYPE: - PROMOTE_MODE (mode, unsignedp, type); +#ifdef PROMOTE_MODE + if (for_call) + { +#endif + PROMOTE_FUNCTION_MODE (mode, unsignedp, type); +#ifdef PROMOTE_MODE + } + else + { + PROMOTE_MODE (mode, unsignedp, type); + } +#endif break; #endif |