From: Kazu Hirata Date: Sun, 8 Feb 2004 23:08:48 +0000 (+0000) Subject: target-def.h (TARGET_STRUCT_VALUE_RTX): Define as hook_rtx_tree_int_null. X-Git-Tag: releases/gcc-4.0.0~10255 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f6acb82a2bb3a7662c566cb65d8505853dedc4f;p=thirdparty%2Fgcc.git target-def.h (TARGET_STRUCT_VALUE_RTX): Define as hook_rtx_tree_int_null. * target-def.h (TARGET_STRUCT_VALUE_RTX): Define as hook_rtx_tree_int_null. * targhooks.c (default_struct_value_rtx): Remove. * targhooks.h: Remove the prototype for default_struct_value_rtx. * config/alpha/alpha.c, config/arc/arc.c, config/avr/avr.c, config/fr30/fr30.c, config/h8300/h8300.c, config/i386/i386.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/mcore/mcore.c, config/mips/mips.c, config/mn10300/mn10300.c, config/pdp11/pdp11.c, config/rs6000/rs6000.c, config/s390/s390.c, config/stormy16/stormy16.c, config/v850/v850.c, config/xtensa/xtensa.c (TARGET_STRUCT_VALUE_RTX): Remove. * doc/tm.texi (TARGET_STRUCT_VALUE_RTX): Document the default. From-SVN: r77505 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 59aa6a88077d..241bca6ab5d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2004-02-08 Kazu Hirata + + * target-def.h (TARGET_STRUCT_VALUE_RTX): Define as + hook_rtx_tree_int_null. + * targhooks.c (default_struct_value_rtx): Remove. + * targhooks.h: Remove the prototype for + default_struct_value_rtx. + * config/alpha/alpha.c, config/arc/arc.c, config/avr/avr.c, + config/fr30/fr30.c, config/h8300/h8300.c, config/i386/i386.c, + config/ip2k/ip2k.c, config/iq2000/iq2000.c, + config/m32r/m32r.c, config/mcore/mcore.c, config/mips/mips.c, + config/mn10300/mn10300.c, config/pdp11/pdp11.c, + config/rs6000/rs6000.c, config/s390/s390.c, + config/stormy16/stormy16.c, config/v850/v850.c, + config/xtensa/xtensa.c (TARGET_STRUCT_VALUE_RTX): Remove. + * doc/tm.texi (TARGET_STRUCT_VALUE_RTX): Document the default. + 2004-02-08 Joseph S. Myers * README.Portability: Change "ISO C89" to "ISO C90". diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index b1eb7f69b4f7..38f7b2a88015 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -10221,8 +10221,6 @@ alpha_init_libfuncs (void) #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY alpha_return_in_memory #undef TARGET_SETUP_INCOMING_VARARGS diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index f0c1bf22fac0..0f4396ac1c1f 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -136,8 +136,6 @@ static bool arc_return_in_memory (tree, tree); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY arc_return_in_memory diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 07540df9f3a6..207f5f390bc6 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -244,8 +244,6 @@ int avr_case_values_threshold = 30000; #undef TARGET_MACHINE_DEPENDENT_REORG #define TARGET_MACHINE_DEPENDENT_REORG avr_reorg -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY avr_return_in_memory diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c index d6ffc760e359..7a4f04ff9c3a 100644 --- a/gcc/config/fr30/fr30.c +++ b/gcc/config/fr30/fr30.c @@ -154,9 +154,6 @@ static rtx fr30_pass_by_value (tree, tree); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null - #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS fr30_setup_incoming_varargs diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 668f273f363c..c8d79378cbfe 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -4680,8 +4680,6 @@ h8300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) #undef TARGET_INIT_LIBFUNCS #define TARGET_INIT_LIBFUNCS h8300_init_libfuncs -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY h8300_return_in_memory diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6a0701cbfebc..a91a39c05eac 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1028,9 +1028,6 @@ static void init_ext_80387_constants (void); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null - #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS ix86_setup_incoming_varargs diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c index 13652e41218c..7c3d46fd1d3e 100644 --- a/gcc/config/ip2k/ip2k.c +++ b/gcc/config/ip2k/ip2k.c @@ -115,8 +115,6 @@ const struct attribute_spec ip2k_attribute_table[]; #undef TARGET_INIT_LIBFUNCS #define TARGET_INIT_LIBFUNCS ip2k_init_libfuncs -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY ip2k_return_in_memory diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index ca48c915d1d7..90efc4b44d37 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -192,8 +192,6 @@ static bool iq2000_return_in_memory (tree, tree); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY iq2000_return_in_memory diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 849c73f3a604..dcab504d3692 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -150,8 +150,6 @@ static bool m32r_rtx_costs (rtx, int, int, int *); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY m32r_return_in_memory diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index 8f2036ce7ec7..468b7d1f4160 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -190,8 +190,6 @@ static bool mcore_return_in_memory (tree, tree); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY mcore_return_in_memory diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 689d6fe72d64..ad6d3c508806 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -807,8 +807,6 @@ const struct mips_cpu_info mips_cpu_info_table[] = { #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY mips_return_in_memory #undef TARGET_RETURN_IN_MSB diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index f7811390d472..2c68dcb04bab 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -93,8 +93,6 @@ static rtx mn10300_builtin_saveregs (void); #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY mn10300_return_in_memory diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 9102dcdd3a00..71adbeaa39c1 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -169,8 +169,6 @@ static bool pdp11_return_in_memory (tree, tree); #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS pdp11_rtx_costs -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY pdp11_return_in_memory diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9cacc88f7001..2c36d9e24080 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -595,10 +595,6 @@ static const char alt_reg_names[][8] = #undef TARGET_PROMOTE_FUNCTION_RETURN #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true -/* Structure return values are passed as an extra parameter. */ -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null - #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY rs6000_return_in_memory diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 343d16582254..dabd52625f06 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -154,9 +154,6 @@ static tree s390_build_builtin_va_list (void); #undef TARGET_PROMOTE_FUNCTION_RETURN #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null - struct gcc_target targetm = TARGET_INITIALIZER; extern int reload_completed; diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 7678ccfcafd2..e19236b35da4 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -2204,8 +2204,6 @@ xstormy16_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 83cf9d13f231..08adab1293d0 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -122,8 +122,6 @@ static int v850_interrupt_p = FALSE; #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY v850_return_in_memory diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 359ab77e4c39..c6cc33d608fd 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -246,8 +246,6 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY xtensa_return_in_memory diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index f290c1c21f5c..a141627c100f 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -3969,7 +3969,9 @@ If not defined, this defaults to the value 1. This target hook should return the location of the structure value address (normally a @code{mem} or @code{reg}), or 0 if the address is passed as an ``invisible'' first argument. Note that @var{fndecl} may -be @code{NULL}, for libcalls. +be @code{NULL}, for libcalls. You do not need to define this target +hook if the address is always passed as an ``invisible'' first +argument. On some architectures the place where the structure value address is found by the called function is not the same place that the diff --git a/gcc/target-def.h b/gcc/target-def.h index 54a47721c9db..289ab412c6ee 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -329,7 +329,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_false #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false -#define TARGET_STRUCT_VALUE_RTX default_struct_value_rtx +#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null #define TARGET_RETURN_IN_MEMORY default_return_in_memory #define TARGET_RETURN_IN_MSB hook_bool_tree_false diff --git a/gcc/targhooks.c b/gcc/targhooks.c index ce491b283396..a2c8273a5178 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -78,13 +78,6 @@ default_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2) return VOIDmode; } -rtx -default_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, - int incoming ATTRIBUTE_UNUSED) -{ - abort (); -} - bool default_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) diff --git a/gcc/targhooks.h b/gcc/targhooks.h index 2de18e75bb61..cbe0f6abb8af 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -23,7 +23,6 @@ extern void default_external_libcall (rtx); extern enum machine_mode default_cc_modes_compatible (enum machine_mode, enum machine_mode); -extern rtx default_struct_value_rtx (tree, int); extern bool default_return_in_memory (tree, tree); extern rtx default_expand_builtin_saveregs (void);