Re: Stack Boundary

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

 



Hello.

On 8/18/2013 2:31 AM, Mike wrote:
Using GCC 4.7.2 in MINGW.

Cannot figure out the code generated for "
-mpreferred-stack-boundary=7".  If you understand the generated code,
please explain.

I compiled a sample program I wrote (attached), disassembled it, and
looked at the important instruction "sub esp,ALIGN_CONSTANT" in each of
the functions.

With a -mpreferred-stack-boundary setting of 7, that means each function
should be aligned to 128 bytes, or 0x80 bytes.

But these are the results of ALIGN_CONSTANT

FUNCTION,ALIGN_CONSTANT
start,0x178
sum,0x8C
m,0x178

I would think ALIGN_CONSTANT should be closer to 128 minus a small value
for all 3 functions.  But 0x178 and 0x8c?








[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