From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Lehmann To: egcs@cygnus.com Subject: Re: [EGCS] Re: double alignment patch for x86 Date: Tue, 19 Aug 1997 19:45:02 -0000 Message-id: In-reply-to: 10604.871961073@hurl.cygnus.com X-SW-Source: 1997-08/0192.html > > IMHO, the stack should always be aligned to an 8 byte boundary unless you > > specifically ask for it otherwise (-fspace for instance). Otherwise, your > > caller may not have aligned the stack properly. >That's one way to approach the problem, but it results in an extra insn to >mask off the low bits of the stack in the prologue. One thing that bugs me for months now (need advice): gcc currently ignores the alignment set by FUNCTION_ARG_BOUNDARY on machines that use push instructions to store arguments. This results in incorrect code (caller forgets the necessary padding) with the proposed -marg-align-double. I'd like to fix this... so... where would be the place to do that? Should store_one_arg add padding, or should this be done in expand_call? >Options which increase the minimum alignment requirements for stack objects >implicitly depend on the OS, crt0 and friends to maintain proper alignment. We could make the switch dependent on the OS (Linux -> do, solaris -> ignore). That's somewhat ugly, but it doesn't break any programs. In worst case we could simply default this switch to off. >[ Which is why I would generally discourage options which work in this > manner. ] I'd say we shouldn't discourage options that can easily double code speed, with only minimal changes. And on many machines, you have more alignment than the standard says anyway. -----==- ----==-- _ ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / pcg@goof.com -=====/_/_//_/\_,_/ /_/\_\ The choice of a GNU generation