aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.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/function.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/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 41878a9..3ae5a3a 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4249,9 +4249,8 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs,
locate->size.constant -= part_size_in_regs;
}
-#ifdef FUNCTION_ARG_OFFSET
- locate->offset.constant += FUNCTION_ARG_OFFSET (passed_mode, type);
-#endif
+ locate->offset.constant
+ += targetm.calls.function_arg_offset (passed_mode, type);
}
/* Round the stack offset in *OFFSET_PTR up to a multiple of BOUNDARY.