Re: AMD64: stack alignment

Michael Abbott <[email protected]> Wed, 18 Dec 2013 09:39:01 -0600
Newsgroups gmane.comp.lib.state-threads.devel
Message-ID <[email protected]>
Thanks for the report.  Googling for "movdqa alignment" turns up some interesting links such as this very informative one:  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838.  I see in your example that the stack is 32-byte aligned before the pushq but then is no longer aligned properly for the movdqa.  This seems more like a compiler issue than a state threads issue, since state threads ensures that the stack starts 64-byte aligned.  Have you tried compiler options like -mstackrealign or whatever your compiler supports?

Your patch changes the stack base from being 64-byte aligned to being only 8-byte aligned which seems backwards and could break other code.  I'm afraid I won't adopt your patch into the ST distribution as is -- but of course you are welcome to run with your patched version all you like.  If you can devise a more general, universally safe patch I will reconsider.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk