This is the mail archive of the java-patches@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: Patch: gcj optimizations


Bryce McKinlay writes:
 > Andrew Haley wrote:
 > 
 > >> So, perhaps we need a flag to control whether the FP Math.* functions 
 > > > can be inlined (or replaced with system math lib calls which is what 
 > > > will actually happen in some cases), which we can then turn on/off in 
 > > > the libjava configure?
 > >
 > >I don't get this.  We need class StrictMath to do what class Math did
 > >originally, and calls to class Math to call builtins where
 > >appropriate, no?
 > >
 > 
 > Right, but the question is whether the builtins meet the requirements of 
 > the (relaxed) Math.* spec on all platforms. They do on x86, but on all 
 > targets that libjava supports?

I think we can guarantee it on x86 and all targets that use glibc.
For other cases -- perhaps where an unfree library with no precision
specification is used -- it makes sense to say in the docs "we don't
know if this library meets Java's precision requirements" and leave it
at that.

I suppose we should allow libgcj to be configured to use
java.lang.Math by default, even when there is a native library
available.  This would have a benefit in that it would allow operation
on systems with known buggy fp libraries.

So I agree -- we need to control this in libjava configure.

Andrew.


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