Mail Archives: djgpp-workers/1998/01/12/12:36:41
> On Sun, 11 Jan 1998, DJ Delorie wrote:
> > 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)!
I don't know how exactly gcc keeps tracks of what alignment the stack is,
but I sent crt1.s a week ago to Marc Lehmann and he assured me that
it would be OK as long as crt1.c was compiled with -mstack-align-double,
and was otherwise equivalent to our original patch to crt1.c I think
its somewhat counter-intuitive in that the stack must be aligned
befoe the arguments are pushed and the call issued, not after.
I'll sent marc a note asking him to mail a small explanation.
> Doesn't compiling crt1.c with -malign-double fix this? I thought
> -malign-double exists exactly for this reason, no?
No, AFAIK -mailgn-double only affects globals stored in .data. It
doesn't do anything to the stack, so you are still subject to
a 3 clock penalty for accesses there. That was why stack-align-double
was created.
Andy
--
_______ ___________________________________________________________
/ Andrew Crabtree
/ Workgroup Networks Division
____ ___ / Hewlett-Packard
/ / / / Roseville, CA
__/ __/ _____/ 916/785-1675
/ andrewc AT rosemail DOT rose DOT hp DOT com
___________ __/ _____________________________________________________
- Raw text -