re PR target/58066 (__tls_get_addr is called with misaligned stack on x86-64)
PR rtl-optimization/58066 * calls.c (expand_call): Precompute register parameters before stack alignment is performed. From-SVN: r225807
This commit is contained in:
parent
7a708f68bf
commit
ac4ee45775
@ -1,3 +1,9 @@
|
||||
2015-07-15 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR rtl-optimization/58066
|
||||
* calls.c (expand_call): Precompute register parameters before stack
|
||||
alignment is performed.
|
||||
|
||||
2015-07-15 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR rtl-optimization/66838
|
||||
|
11
gcc/calls.c
11
gcc/calls.c
@ -3144,6 +3144,13 @@ expand_call (tree exp, rtx target, int ignore)
|
||||
|
||||
compute_argument_addresses (args, argblock, num_actuals);
|
||||
|
||||
/* Precompute all register parameters. It isn't safe to compute
|
||||
anything once we have started filling any specific hard regs.
|
||||
TLS symbols sometimes need a call to resolve. Precompute
|
||||
register parameters before any stack pointer manipulation
|
||||
to avoid unaligned stack in the called function. */
|
||||
precompute_register_parameters (num_actuals, args, ®_parm_seen);
|
||||
|
||||
/* Perform stack alignment before the first push (the last arg). */
|
||||
if (argblock == 0
|
||||
&& adjusted_args_size.constant > reg_parm_stack_space
|
||||
@ -3184,10 +3191,6 @@ expand_call (tree exp, rtx target, int ignore)
|
||||
|
||||
funexp = rtx_for_function_call (fndecl, addr);
|
||||
|
||||
/* Precompute all register parameters. It isn't safe to compute anything
|
||||
once we have started filling any specific hard regs. */
|
||||
precompute_register_parameters (num_actuals, args, ®_parm_seen);
|
||||
|
||||
if (CALL_EXPR_STATIC_CHAIN (exp))
|
||||
static_chain_value = expand_normal (CALL_EXPR_STATIC_CHAIN (exp));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user