This is the mail archive of the
mailing list for the Java project.
Re: New MingW 3.4 Build
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Andrew Haley <aph at redhat dot com>, Ranjit Mathew <rmathew at hotmail dot com>
- Cc: GCJ Java <java at gcc dot gnu dot org>
- Date: Mon, 29 Sep 2003 06:52:27 -0500
- Subject: Re: New MingW 3.4 Build
- Reply-to: gnustuff at thisiscool dot com
>Could it be that an optimisation introduced
>in recent times makes the first few parameters
>go into available x86 registers? (Maybe this
>is done only for static functions as it would
>break linking with other modules without
>an explicit regparm or fastcall attribute.)
>cygwin.asm clobbers EAX and if the first parameter
>is passed in EAX, that could explain why it is
>turned into garbage...
>IIRC, EAX was also used for returning values on
>x86, so the generated code has to be careful about
>not accidently overwriting the parameter. Maybe
>it is, maybe it is not. ;-)
You're on the right track. My debugging session last
night seemed to corroborate this. Danny Smith sent
me this promising response at mingw-dvlpr:
>In any case, Mohan, I do not believe that specifying
>"-mno-stack-arg-probe" will ruin jar.exe - you
>are just disabling extra checking and one that
>(potentially) clobbers your parameter values!
I would have thought this too, but it <i>does</i>.
It's bizarre, but you can verify it yourself.
>It may be that I'm totally off the mark here, in
>which case I would really appreciate if someone
>could throw some light on this - this looks like
>an interesting problem and a serious one for
I'm going to start by trying to build with
-fno-unit-at-a-time, like Danny suggested. All indications
in i386.c seem like this should work, but what
do I know?