summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 14:57:28 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 14:57:28 +0000
commit17bfc2bca134db717c37d1fe5952496c172635af (patch)
tree1836524298f4090e69415cd574678b08885fc75a /gcc/function.c
parent8bab8c204a80c9d915d2b1a4442467b10eff083d (diff)
downloadgcc-17bfc2bca134db717c37d1fe5952496c172635af.tar.gz
* doc/tm.texi.in (FUNCTION_ARG_PADDING): Mention
TARGET_FUNCTION_ARG_ROUND_BOUNDARY. (TARGET_FUNCTION_ARG_ROUND_BOUNDARY): Add hook. * function.c (locate_and_pad_parm): Take it into account. * target.def (function_arg_round_boundary): New hook. * targhooks.c (default_function_arg_round_boundary): New function. * targhooks.h (default_function_arg_round_boundary): Declare. * doc/tm.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176207 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 0b2f5aa5c37..894930f75bb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3705,7 +3705,7 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
{
tree sizetree;
enum direction where_pad;
- unsigned int boundary;
+ unsigned int boundary, round_boundary;
int reg_parm_stack_space = 0;
int part_size_in_regs;
@@ -3737,6 +3737,8 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
= type ? size_in_bytes (type) : size_int (GET_MODE_SIZE (passed_mode));
where_pad = FUNCTION_ARG_PADDING (passed_mode, type);
boundary = targetm.calls.function_arg_boundary (passed_mode, type);
+ round_boundary = targetm.calls.function_arg_round_boundary (passed_mode,
+ type);
locate->where_pad = where_pad;
/* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */
@@ -3783,8 +3785,8 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
tree s2 = sizetree;
if (where_pad != none
&& (!host_integerp (sizetree, 1)
- || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % PARM_BOUNDARY))
- s2 = round_up (s2, PARM_BOUNDARY / BITS_PER_UNIT);
+ || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % round_boundary))
+ s2 = round_up (s2, round_boundary / BITS_PER_UNIT);
SUB_PARM_SIZE (locate->slot_offset, s2);
}
@@ -3836,8 +3838,8 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
if (where_pad != none
&& (!host_integerp (sizetree, 1)
- || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % PARM_BOUNDARY))
- sizetree = round_up (sizetree, PARM_BOUNDARY / BITS_PER_UNIT);
+ || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % round_boundary))
+ sizetree = round_up (sizetree, round_boundary / BITS_PER_UNIT);
ADD_PARM_SIZE (locate->size, sizetree);