__tls_get_addr must be called with 16-byte aligned stack, which is guaranted by setting preferred_stack_boundary to 128 bits. There is no need to change stack_alignment_needed for __tls_get_addr.
Tested on x86-64. OK for trunk? H.J. -- PR target/68986 * config/i386/i386.c (ix86_update_stack_boundary): Don't change stack_alignment_needed for __tls_get_addr call. --- gcc/config/i386/i386.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cfbdf0f..6dc1fa5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -12035,11 +12035,7 @@ ix86_update_stack_boundary (void) /* __tls_get_addr needs to be called with 16-byte aligned stack. */ if (ix86_tls_descriptor_calls_expanded_in_cfun && crtl->preferred_stack_boundary < 128) - { - crtl->preferred_stack_boundary = 128; - if (crtl->stack_alignment_needed < 128) - crtl->stack_alignment_needed = 128; - } + crtl->preferred_stack_boundary = 128; } /* Handle the TARGET_GET_DRAP_RTX hook. Return NULL if no DRAP is -- 2.5.0