Does anyone know why gcc (v4.0.0) emits the assembly code it uses to the align the stack frame for main? I am particularly interested in the bit that does
movl $0, %eax
addl $15, %eax
addl $15, %eax
shrl $4, %eax
sall $4, %eax
subl %eax, %esp
I know what it does I just want to understand why gcc takes this very convoluted way to do it? There must be a reason, doesn't there?
Thanks for any suggestions.