Mail Archives: djgpp-workers/1998/01/11/14:23:43
I just thought of something. Here's the crt0.s code:
movw %ds, %dx /* set stack */
movw %dx, %ss
andb $0xf8, %eax /* align to 8-byte boundary */
movl %eax, %esp
xorl %ebp, %ebp
call ___crt1_startup /* run program */
jmp exit
Won't the call make the stack 4-byte aligned again? I think it does,
which would make pgcc code run at *worst* case (always unaligned)!
Maybe we do need to fix this in crt1.c, or mis-align %esp in crt0.s to
accomodate the call.
- Raw text -