Re: Reserve space in stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/12/2016 06:34 AM, sztfg@xxxxxxxxx wrote:

test:
         subq    $8, %rsp # why?
         call    dummy
         xorl    %eax, %eax
         addq    $8, %rsp # why?
         ret
         .size   test, .-test

Why need to do this subq addq?

The x86_64 ABI requires that the stack pointer is a multiple of 16 before the CALL instruction is executed. This simplifies code in functions which need to store vector register values on the stack.

Florian




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux