20 Aug 10:08
changeset in /hg/icedtea6: 2008-08-20 Gary Benson <gbenson <at> red...
From: Gary Benson <gbenson@...>
Subject: changeset in /hg/icedtea6: 2008-08-20 Gary Benson <gbenson <at> red...
Newsgroups: gmane.comp.java.openjdk.distro-packaging.devel
Date: 2008-08-20 08:12:46 GMT
Subject: changeset in /hg/icedtea6: 2008-08-20 Gary Benson <gbenson <at> red...
Newsgroups: gmane.comp.java.openjdk.distro-packaging.devel
Date: 2008-08-20 08:12:46 GMT
changeset 67600de741be in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=67600de741be description: 2008-08-20 Gary Benson <gbenson@...> * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp (VMlongDiv): Handle the special case of division of the most negative value possible by -1. (VMlongRem): Likewise. diffstat: 2 files changed, 13 insertions(+), 3 deletions(-) ChangeLog | 7 +++++++ ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp | 9 ++++++--- diffs (40 lines): diff -r 8bd5f7718ae0 -r 67600de741be ChangeLog --- a/ChangeLog Sun Aug 17 16:03:52 2008 +0200 +++ b/ChangeLog Wed Aug 20 04:12:41 2008 -0400 @@ -1,3 +1,10 @@ 2008-08-15 Matthias Klose <doko <at> ubuntu +2008-08-20 Gary Benson <gbenson@...> + + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp + (VMlongDiv): Handle the special case of division of the most + negative value possible by -1. + (VMlongRem): Likewise. + 2008-08-15 Matthias Klose <doko@...> * acinclude.m4 (FIND_LIBGCJ_JAR): Extend check for libgcj-4.2.*.jar. diff -r 8bd5f7718ae0 -r 67600de741be ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp --- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Sun Aug 17 16:03:52 2008 +0200 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Wed Aug 20 04:12:41 2008 -0400 @@ -54,8 +54,9 @@ inline jlong BytecodeInterpreter::VMlong } inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) { - // QQQ what about check and throw... - return op1 / op2; + /* it's possible we could catch this special case implicitly */ + if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return op1; + else return op1 / op2; } inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) { @@ -75,7 +76,9 @@ inline jlong BytecodeInterpreter::VMlong } inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) { - return op1 % op2; + /* it's possible we could catch this special case implicitly */ + if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return 0; + else return op1 % op2; } inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
RSS Feed