Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,965 of 4,675    |
|    Alex to All    |
|    64 bit stack alignment    |
|    29 Aug 17 16:07:13    |
      From: alex@nospicedham.rivadpm.com              On 64 bit Windows, stack alignment on a 16 byte boundary is required       before calling all except a leaf function. In the called function, the       stack is 8 mod 16.              Now, I'm struggling to come up with a way of doing it beyond this code       (which I didn't invent, but I can't for the life of me remember where I       found it.)               push rsp        push [rsp]        and spl $F0        call funkychicken        pop rsp              It seems to be the only way of doing this without branches, flags or       other expensive nonsense. But, as ever, there may be a better way. Any       suggestions?                     --       Alex              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca