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


Andrew Haley wrote:
>  > there's an unresolved issue which I've worked around, but not
>  > completely:
>  > 
>  > http://gcc.gnu.org/ml/java/2003-09/msg00336.html
>  > 
>  > I've worked around this issue by peppering the
>  > build flags with -mno-stack-arg-probe, but I'm
>  > sure that this isn't correct approach.
> 
> Uhh, you're not using regparm, are you?

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. ;-)

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!

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.

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


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