aboutsummaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-15 14:37:28 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-15 14:37:28 +0000
commit870118b7f139a2477cd16de9d8539946959c5633 (patch)
tree0f38ba28fa9b8476ec879058ccc6a40b6b2d5bc7 /gcc/targhooks.c
parentbb149ca2e912038dce733f95ab1c24ff0d1af280 (diff)
downloadgcc-870118b7f139a2477cd16de9d8539946959c5633.zip
gcc-870118b7f139a2477cd16de9d8539946959c5633.tar.gz
gcc-870118b7f139a2477cd16de9d8539946959c5633.tar.bz2
Turn FUNCTION_ARG_OFFSET into a hook
2017-09-13 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * target.def (function_arg_offset): New hook. * targhooks.h (default_function_arg_offset): Declare. * targhooks.c (default_function_arg_offset): New function. * function.c (locate_and_pad_parm): Use targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET. * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with... (TARGET_FUNCTION_ARG_OFFSET): ...this. * doc/tm.texi: Regenerate. * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete. * config/spu/spu.c (spu_function_arg_offset): New function. (TARGET_FUNCTION_ARG_OFFSET): Redefine. * system.h (FUNCTION_ARG_OFFSET): Poison. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r252821
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 98e553c..4bd4833 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -734,6 +734,14 @@ default_function_arg_advance (cumulative_args_t ca ATTRIBUTE_UNUSED,
gcc_unreachable ();
}
+/* Default implementation of TARGET_FUNCTION_ARG_OFFSET. */
+
+HOST_WIDE_INT
+default_function_arg_offset (machine_mode, const_tree)
+{
+ return 0;
+}
+
/* Default implementation of TARGET_FUNCTION_ARG_PADDING: usually pad
upward, but pad short args downward on big-endian machines. */