|
From: Danny S. <dan...@cl...> - 2003-10-08 19:27:40
|
----- Original Message ----- From: "Ranjit Mathew > Luke Dunstan wrote: > >>>>Is there a particular reason to remove it > >>>>though, apart from when statically linking > >>>>GCC-compiled objects with MSVC programs > >>>>or vice versa? > >>> > >>>Yes, it plays up with optimisation using > >>>-funit-at-a-time in CVS gcc, > >> > >>More specifically, -funit-at-a-time (which is > >>now enabled by -O2) changes the calling > >>conventions of local functions (functions that > >>are defined, accessible and used within a single > >>compilation unit) to use as many (max. three?) > >>registers for passing parameters as possible. > >> > >>MinGW/Cygwin's current implementation of > >>__chkstk/_alloca clobbers EAX, resulting in > >>a parameter to local functions getting > >>converted to garbage. > > > > > > Then perhaps "-funit-at-a-time" on MinGW should imply > > "-mno-stack-arg-probe". > > A simpler solution would be to limit > the registers used by -funit-at-a-time > to the stock ECX & EDX. > > It appears that this is a simple matter > of changing contents of the very last "if" > condition in ix86_function_regparm( ) > in gcc/config/i386/i386.c (let regparm > be equal to 2 always). Of course, > I could be mistaken and this might not > be so simple to fix after all. > Their is an ABI issue here. Wouldn't that seriously break library code using the old meaning of regparm? Changing cygwin.asm is also questionable. Ranjit, have you discussed your ix86_function_regparm approach with Honza, who is assigned the bug (PR12209) Danny. > > -- > Ranjit Mathew Email: rmathew AT hotmail DOT com > > Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > MinGW-dvlpr mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-dvlpr |