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/config/sparc | |
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/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.c | 17 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 18 |
2 files changed, 11 insertions, 24 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 30b789b..76ccb34 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -274,20 +274,15 @@ enum processor_type sparc_cpu; #undef TARGET_ADDRESS_COST #define TARGET_ADDRESS_COST hook_int_rtx_0 -/* Return TRUE if the promotion described by PROMOTE_MODE should also be done - for outgoing function arguments. - This is only needed for TARGET_ARCH64, but since PROMOTE_MODE is a no-op - for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime test - for this value. */ +/* This is only needed for TARGET_ARCH64, but since PROMOTE_FUNCTION_MODE is a + no-op for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime + test for this value. */ #undef TARGET_PROMOTE_FUNCTION_ARGS #define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true -/* Return TRUE if the promotion described by PROMOTE_MODE should also be done - for the return value of functions. If this macro is defined, FUNCTION_VALUE - must perform the same promotions done by PROMOTE_MODE. - This is only needed for TARGET_ARCH64, but since PROMOTE_MODE is a no-op - for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime test - for this value. */ +/* This is only needed for TARGET_ARCH64, but since PROMOTE_FUNCTION_MODE is a + no-op for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime + test for this value. */ #undef TARGET_PROMOTE_FUNCTION_RETURN #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 58eb4c8..33c1256 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -712,24 +712,16 @@ extern struct sparc_cpu_select sparc_select[]; if ptr_mode and Pmode are the same. */ #define POINTERS_EXTEND_UNSIGNED 1 -/* A macro to update MODE and UNSIGNEDP when an object whose type - is TYPE and which has the specified mode and signedness is to be - stored in a register. This macro is only called when TYPE is a - scalar type. */ -#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ +/* For TARGET_ARCH64 we need this, as we don't have instructions + for arithmetic operations which do zero/sign extension at the same time, + so without this we end up with a srl/sra after every assignment to an + user variable, which means very very bad code. */ +#define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE) \ if (TARGET_ARCH64 \ && GET_MODE_CLASS (MODE) == MODE_INT \ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ (MODE) = word_mode; -/* This is only needed for TARGET_ARCH64, but since PROMOTE_MODE is a no-op - for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime test - for this value. For TARGET_ARCH64 we need it, as we don't have instructions - for arithmetic operations which do zero/sign extension at the same time, - so without this we end up with a srl/sra after every assignment to an - user variable, which means very very bad code. */ -#define PROMOTE_FOR_CALL_ONLY - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY (TARGET_ARCH64 ? 64 : 32) |