|
From: Luke D. <cod...@ho...> - 2003-10-08 07:16:02
|
----- Original Message ----- From: "Ranjit Mathew" <rm...@ho...> To: "MinGW Developers" <min...@li...> Sent: Wednesday, October 08, 2003 2:03 PM Subject: [MinGW-dvlpr] Re: _alloca/_chkstk?? > >> 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". Luke > > This specifically causes a crash in > the GCJ parser on MinGW. > > So either __chkstk/_alloca has to be done > away with or modified to not clobber EAX (and > use something else to get the stack size value). > > Otherwise, 3.4 will be grief incarnate for > MinGW/Cygwin. > > Ranjit. > > -- > Ranjit Mathew Email: rmathew AT hotmail DOT com > > Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/ |