aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/frv
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-07-13 23:24:27 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-07-13 23:24:27 -0700
commit8cd5a4e07d23dc35cb601121b948a3e33e09e1f3 (patch)
tree0831bbea139cb77f60030d22ed84f1ab3e43068a /gcc/config/frv
parent0310e5373b19d2d5edeb37c4cd4a4ff1af1da4cd (diff)
downloadgcc-8cd5a4e07d23dc35cb601121b948a3e33e09e1f3.zip
gcc-8cd5a4e07d23dc35cb601121b948a3e33e09e1f3.tar.gz
gcc-8cd5a4e07d23dc35cb601121b948a3e33e09e1f3.tar.bz2
target.h (struct gcc_target): Add calls.pass_by_reference.
* target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
Diffstat (limited to 'gcc/config/frv')
-rw-r--r--gcc/config/frv/frv-protos.h4
-rw-r--r--gcc/config/frv/frv.c12
-rw-r--r--gcc/config/frv/frv.h3
3 files changed, 3 insertions, 16 deletions
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index a7a8ee6..a63669b 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -84,10 +84,6 @@ extern int frv_function_arg_partial_nregs (CUMULATIVE_ARGS *,
enum machine_mode,
tree, int);
-extern int frv_function_arg_pass_by_reference (CUMULATIVE_ARGS *,
- enum machine_mode,
- tree, int);
-
extern int frv_function_arg_callee_copies (CUMULATIVE_ARGS *,
enum machine_mode,
tree, int);
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 9935fef..5e4a12f 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include "target.h"
#include "target-def.h"
+#include "targhooks.h"
#include "integrate.h"
#ifndef FRV_INLINE
@@ -329,6 +330,8 @@ static bool frv_must_pass_in_stack (enum machine_mode mode, tree type);
#define TARGET_STRUCT_VALUE_RTX frv_struct_value_rtx
#undef TARGET_MUST_PASS_IN_STACK
#define TARGET_MUST_PASS_IN_STACK frv_must_pass_in_stack
+#undef TARGET_PASS_BY_REFERENCE
+#define TARGET_PASS_BY_REFERENCE hook_pass_by_reference_must_pass_in_stack
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
#define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs
@@ -3147,15 +3150,6 @@ frv_function_arg_partial_nregs (CUMULATIVE_ARGS *cum,
}
-int
-frv_function_arg_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
- enum machine_mode mode,
- tree type,
- int named ATTRIBUTE_UNUSED)
-{
- return targetm.calls.must_pass_in_stack (mode, type);
-}
-
/* If defined, a C expression that indicates when it is the called function's
responsibility to make a copy of arguments passed by invisible reference.
Normally, the caller makes a copy and passes the address of the copy to the
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index 493ebc7..838ca17 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -1901,9 +1901,6 @@ struct machine_function GTY(())
/* extern int frv_function_arg_partial_nregs (CUMULATIVE_ARGS, int, Tree, int); */
-#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
- frv_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED)
-
/* If defined, a C expression that indicates when it is the called function's
responsibility to make a copy of arguments passed by invisible reference.
Normally, the caller makes a copy and passes the address of the copy to the