This is the mail archive of the 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]
Other format: [Raw text]

Re: PATCH [i386 windows targets]: Disallow regparm for functionsthat probe stack

> I couldn't find any email about this but I do recall researching what
> needed to be done to fix it.

> It seems like it should be possible to detect the case where EAX is
> live, push it on the stack, and "pop" it after calling
> __chkstk/alloca.   It won't be a true, "pop" of course because the
> stack will have been adjusted but it should still be possible to
> retrieve the register, regardless.

I thought about doing this and actually modified cygwin.asm's __alloca to accomplish this. I think I had it working (at the time PR8750 started failing again, though even that might now work after the recent cygwin prologue was clean up). Then I realized that it was no better, and probably worse, than Danny's patch, since the function was doing an extra push/quasi-pop on %eax just to avoid the "penalty" of having to push the parameter onto the stack originally.

Which seemed kind of pointless to me.

Kelley Cook

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