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,0x178I would think ALIGN_CONSTANT should be closer to 128 minus a small value for all 3 functions. But 0x178 and 0x8c?
Attachment:
CallingConventions.tar.gz
Description: application/gzip