From: Andrew Crabtree Message-Id: <199801121732.AA069226361@typhoon.rose.hp.com> Subject: Re: 8-byte stack alignment again To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Mon, 12 Jan 1998 9:32:40 PST Cc: djgpp-workers AT delorie DOT com In-Reply-To: ; from "Eli Zaretskii" at Jan 12, 98 11:24 am Reply-To: andrewc AT rosemail DOT rose DOT hp DOT com Precedence: bulk > 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 ___________ __/ _____________________________________________________