public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* SPECjbb vs. 3.1 status
@ 2002-04-26 15:48 Boehm, Hans
  0 siblings, 0 replies; only message in thread
From: Boehm, Hans @ 2002-04-26 15:48 UTC (permalink / raw)
  To: 'java@gcc.gnu.org'; +Cc: 'tromey@redhat.com'

I think I now understand all the issues still affecting SPECjbb and gcc3.1
on X86 (IA64 is fine):

0) GNATS 6411 and 6382 force some of the sanity tests to be commented out.

1) The ICEs at reload1.c:9514 reported in
http://gcc.gnu.org/ml/java/2002-04/msg00253.html are still there.  For 3.1
only, should we replace the offending "abort();" by a "continue;"?  This
seems to work around the problem, at least for examples similar to the ones
I've seen.  I have mixed feelings about it, since I'm not sure how likely it
is to turn an ICE into silentely emitted wrong code.

2) Floating point operations are generally carried out at the wrong
precision on X86.  AFAICT, the fp control word specifies extended precision
operation, but the JLS requires that we never use more than double precision
(though we may use bigger exponents if strictfp isn't specified).  This
causes the following program to print 8 instead of 9.  (I claim that if you
write this code, you have no real reason to expect either answer.  Double
precision happens to work out such that you get the more intuitive answer.
Extended precision doesn't, particularly since the constant is only
generated at double precision.)  Unless there is a really easy way to fix
this, I think this will have to wait for a later release.  I'm not sure what
the intended conventions are about the control word.

Test case:

public class fp_test {
    private int m;
    private int n;
    fp_test(int k) {
	if (k < 5) {
	  m = 30;
	} else {
	  m = 0;
	}
	n = (short)(m * 0.30);
    }
    public static void main(String argv[]) {
	fp_test fpt = new fp_test(0);
	System.out.println(fpt.n);
    }
}

This affects SPECjbb in that a random number generator may be invoked the
wrong number of times, thus causing the results to vary.  It also turns out
it tickles what I think is a bug in the source.  (The bug doesn't affect the
utility of the benchmark.  But it seems to magnify rounding errors in
unintended ways.)

Hans

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-26 21:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-26 15:48 SPECjbb vs. 3.1 status Boehm, Hans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).