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: nogc.cc & darwin


Andreas Tobler wrote:

>>I don't think so. sqrtf should be defined by java/lang/w_sqrt.o in
>>libjava. libgcj doesn't need libstdc++ so you shouldn't need to link it.
>>
>
>Can anyone help here? I don't understand.
>
>The sqrtf is mentioned in the comment in w_sqrt.c. But for me I don't
>see the implementation. I see the _sqrt when I nm the w_sqrt.o.
>nm w_sqrt.o:
>
>         U ___ieee754_sqrt
>00000000 T _sqrt
>         U dyld_stub_binding_helper
>
>But the _sqrtf is found in these files, although the *.java of these
>files contains a sqrt call where the type is double and not float. I
>don't find other occurencies of sqrt in *.java.
>
>libjava/java/awt/geom/Line2D.o
>libjava/java/awt/geom/Point2D.o
>libjava/java/util/Random.o
>

Sorry, I mislead you with my previous comment. GCJ is generating a call 
to sqrtf() from the Math.sqrt() calls in these files. I am not sure why 
it is calling sqrtf(), however, instead of sqrt() - this seems wrong 
because the arguments are double!

I think we should really be using the libc implementations of these 
functions since they are faster (written in assembly). We should only 
use the fdlibm math functions for targets that don't have a math library 
(and possibly also for StrictMath?)

regards

Bryce.


 



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