Don't change stack_alignment_needed for __tls_get_addr
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jan 2016 19:54:03 +0000 (19:54 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jan 2016 19:54:03 +0000 (19:54 +0000)
__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.

PR target/68986
* config/i386/i386.c (ix86_update_stack_boundary): Don't
change stack_alignment_needed for __tls_get_addr call.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232901 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index fecbc49..cc8b21c 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/68986
+       * config/i386/i386.c (ix86_update_stack_boundary): Don't
+       change stack_alignment_needed for __tls_get_addr call.
+
 2016-01-27  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.c (print_operand): Rollback 's' removal.
index cfbdf0f..6dc1fa5 100644 (file)
@@ -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