This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: New MingW 3.4 Build


Hi Ranjit,

>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:

http://article.gmane.org/gmane.comp.gnu.mingw.devel/759

>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
>Cygwin/MinGW.

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?

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





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