From 870118b7f139a2477cd16de9d8539946959c5633 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 15 Sep 2017 14:37:28 +0000 Subject: Turn FUNCTION_ARG_OFFSET into a hook 2017-09-13 Richard Sandiford Alan Hayward David Sherwood 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 Co-Authored-By: David Sherwood From-SVN: r252821 --- gcc/function.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 41878a974be..3ae5a3afc0b 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. -- cgit v1.2.1