This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i386 stack missalignment on main


On Mon, Jul 30, 2001 at 02:16:52PM +0200, Jan Hubicka wrote:
> I need to augument gcc to output something like
> 
> .globl main:
> main:
> <align stack and move arguments>
> call label
> <return>
> label:
> normal code
> 
> and whether it is safe to expect main to have maximally two arguments then.

No, you can't.  First, main has 3 arguments.  Two, you've
got to return the stack to normal when leaving main, so
no simple hack is going to cut it.

> Ideas?

Do nothing in the 3.0 timeframe.  Implement proper forced
stack alignment in 3.1, and force that on for main.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]