:I've not looked at 3.3, but I seem to recall that GCC 3.2 :did not actually align the stack within each function, but :preserved the alignment. (That is, each function assumed the stack :had a certain alignment on entry and ensured that alignment :was preserved for any subsequent function calls.)
Easy to test... ah, ok. 3.3 aligns the stack in main(). main: pushl %ebp movl %esp, %ebp subl $8, %esp andl $-16, %esp <<<<< ailgns stack here andl 0xfffffff0,%esp ... And the preserves the alignment in other procedures... 8 + ebp + retaddr is 16 bytes: charlie: pushl %ebp movl %esp, %ebp subl $8, %esp /* I declared 'volatile int x' as a stack var */ call fubar call fubar call fubar leave ret :If I'm remembering this correctly, then aligning :the stack in crt1.o would be pretty much essential. : :Tim Kientzle For gcc 2.95, yes. -Matt Matthew Dillon <[EMAIL PROTECTED]> _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"