aboutsummaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2004-09-08 11:45:21 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-09-08 11:45:21 -0700
commit6cdd56724aff3adc4bef1b5441526d84ddb6d2cb (patch)
treee2b5ae247504eef2927039baf6729090ed6d7ff8 /gcc/targhooks.c
parent7f7e0703105e0ba185eb29beba29e55964b48f55 (diff)
downloadgcc-6cdd56724aff3adc4bef1b5441526d84ddb6d2cb.zip
gcc-6cdd56724aff3adc4bef1b5441526d84ddb6d2cb.tar.gz
gcc-6cdd56724aff3adc4bef1b5441526d84ddb6d2cb.tar.bz2
function.c (reference_callee_copied): New.
* function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 5ecb6d83..042c83e 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -184,17 +184,6 @@ default_cxx_get_cookie_size (tree type)
return cookie_size;
}
-/* This version of the TARGET_PASS_BY_REFERENCE hook adds no conditions
- beyond those mandated by generic code. */
-
-bool
-hook_pass_by_reference_false (CUMULATIVE_ARGS *c ATTRIBUTE_UNUSED,
- enum machine_mode mode ATTRIBUTE_UNUSED, tree type ATTRIBUTE_UNUSED,
- bool named_arg ATTRIBUTE_UNUSED)
-{
- return false;
-}
-
/* Return true if a parameter must be passed by reference. This version
of the TARGET_PASS_BY_REFERENCE hook uses just MUST_PASS_IN_STACK. */
@@ -206,6 +195,16 @@ hook_pass_by_reference_must_pass_in_stack (CUMULATIVE_ARGS *c ATTRIBUTE_UNUSED,
return targetm.calls.must_pass_in_stack (mode, type);
}
+/* Return true if a parameter follows callee copies conventions. This
+ version of the hook is true for all named arguments. */
+
+bool
+hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ tree type ATTRIBUTE_UNUSED, bool named)
+{
+ return named;
+}
/* Emit any directives required to unwind this instruction. */
@@ -262,3 +261,21 @@ default_scalar_mode_supported_p (enum machine_mode mode)
abort ();
}
}
+
+bool
+hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
+ CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+{
+ return false;
+}
+
+bool
+hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true (
+ CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+{
+ return true;
+}