https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68562

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|config/i386/morestack.S     |morestack misaligns stack
                   |misaligns stack on x86_64   |on x86_64

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Actually I think the misalignment starts here:

 libgcc/generic-morestack.c:
   495 void                                                                     
   496 __generic_morestack_set_initial_sp (void *sp, size_t len)                
   497 {                                                                        
   498   /* The stack pointer most likely starts on a page boundary.  Adjust    
   499      to the nearest 512 byte boundary.  It's not essential that we be    
   500      precise here; getting it wrong will just leave some stack space     
   501      unused.  */                                                         
   502 #ifdef __LIBGCC_STACK_GROWS_DOWNWARD__                                   
   503   sp = (void *) ((((__UINTPTR_TYPE__) sp + 511U) / 512U) * 512U);        
   504 #else                                                                    
   505   sp = (void *) ((((__UINTPTR_TYPE__) sp - 511U) / 512U) * 512U);        
   506 #endif

Reply via email to