changeset in /hg/icedtea6: 2008-11-04 Gary Benson <gbenson at red...

Gary Benson gbenson at redhat.com
Tue Nov 4 05:55:43 PST 2008


changeset 69e3a572fc2c in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=69e3a572fc2c
description:
	2008-11-04  Gary Benson  <gbenson at redhat.com>

		PR icedtea/244:
		* patches/icedtea-f2i-overflow.patch: New file.
		* Makefile.am (ICEDTEA_PATCHES): Apply the above.
		* HACKING: Document the above.

diffstat:

4 files changed, 107 insertions(+), 3 deletions(-)
ChangeLog                          |    7 ++
HACKING                            |    4 -
Makefile.am                        |    3 -
patches/icedtea-f2i-overflow.patch |   96 ++++++++++++++++++++++++++++++++++++

diffs (141 lines):

diff -r 835cdb193847 -r 69e3a572fc2c ChangeLog
--- a/ChangeLog	Mon Nov 03 17:14:22 2008 -0500
+++ b/ChangeLog	Tue Nov 04 08:54:30 2008 -0500
@@ -1,3 +1,10 @@ 2008-11-03 Nix  <nix at esperi.org.uk>
+2008-11-04  Gary Benson  <gbenson at redhat.com>
+
+	PR icedtea/244:
+	* patches/icedtea-f2i-overflow.patch: New file.
+	* Makefile.am (ICEDTEA_PATCHES): Apply the above.
+	* HACKING: Document the above.
+
 2008-11-03 Nix  <nix at esperi.org.uk>
 		   Omair Majid  <omajid at redhat.com>
 
diff -r 835cdb193847 -r 69e3a572fc2c HACKING
--- a/HACKING	Mon Nov 03 17:14:22 2008 -0500
+++ b/HACKING	Tue Nov 04 08:54:30 2008 -0500
@@ -62,8 +62,8 @@ The following patches are currently appl
 * icedtea-arch.patch: Add support for additional architectures.
 * icedtea-alt-jar.patch: Add support for using an alternate jar tool in JDK building. 
 * icedtea-hotspot7-tests.patch: Adds hotspot compiler tests from jdk7 tree.
-* patches/icedtea-renderer-crossing.patch: Check whether crossing is
-  initialized in Pisces Renderer.
+* icedtea-renderer-crossing.patch: Check whether crossing is initialized in Pisces Renderer.
+* icedtea-f2i-overflow.patch: Replaces the code used by [fd]2[il] bytecodes to correctly handle overflows. (PR244)
 
 The following patches are only applied to OpenJDK6 in IcedTea6:
 
diff -r 835cdb193847 -r 69e3a572fc2c Makefile.am
--- a/Makefile.am	Mon Nov 03 17:14:22 2008 -0500
+++ b/Makefile.am	Tue Nov 04 08:54:30 2008 -0500
@@ -534,7 +534,8 @@ ICEDTEA_PATCHES = \
 	patches/icedtea-xjc.patch \
 	patches/icedtea-renderer-crossing.patch \
 	patches/icedtea-alsa-default-device.patch \
-	patches/icedtea-linker-libs-order.patch
+	patches/icedtea-linker-libs-order.patch \
+	patches/icedtea-f2i-overflow.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
diff -r 835cdb193847 -r 69e3a572fc2c patches/icedtea-f2i-overflow.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-f2i-overflow.patch	Tue Nov 04 08:54:30 2008 -0500
@@ -0,0 +1,96 @@
+diff -r dcb49b482348 -r f63a8dee04ae openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+--- openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Nov 03 14:00:57 2008 +0000
++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Nov 03 15:56:17 2008 +0000
+@@ -173,64 +173,46 @@ JRT_END
+ 
+ 
+ JRT_LEAF(jint, SharedRuntime::f2i(jfloat  x))
+-  if (g_isnan(x)) {return 0;}
+-  jlong lltmp = (jlong)x;
+-  jint ltmp   = (jint)lltmp;
+-  if (ltmp == lltmp) {
+-    return ltmp;
+-  } else {
+-    if (x < 0) {
+-      return min_jint;
+-    } else {
+-      return max_jint;
+-    }
+-  }
++  if (g_isnan(x))
++    return 0;
++  if (x >= (jfloat) max_jint)
++    return max_jint;
++  if (x <= (jfloat) min_jint)
++    return min_jint;
++  return (jint) x;
+ JRT_END
+ 
+ 
+ JRT_LEAF(jlong, SharedRuntime::f2l(jfloat  x))  
+-  if (g_isnan(x)) {return 0;}
+-  jlong lltmp = (jlong)x;
+-  if (lltmp != min_jlong) {
+-    return lltmp;
+-  } else {
+-    if (x < 0) {
+-      return min_jlong;
+-    } else {
+-      return max_jlong;
+-    }
+-  }
++  if (g_isnan(x))
++    return 0;
++  if (x >= (jfloat) max_jlong)
++    return max_jlong;
++  if (x <= (jfloat) min_jlong)
++    return min_jlong;
++  return (jlong) x;
+ JRT_END
+ 
+ 
+ JRT_LEAF(jint, SharedRuntime::d2i(jdouble x))
+-  if (g_isnan(x)) {return 0;}
+-  jlong lltmp = (jlong)x;
+-  jint ltmp   = (jint)lltmp;
+-  if (ltmp == lltmp) {
+-    return ltmp;
+-  } else {
+-    if (x < 0) {
+-      return min_jint;
+-    } else {
+-      return max_jint;
+-    }
+-  }
++  if (g_isnan(x))
++    return 0;
++  if (x >= (jdouble) max_jint)
++    return max_jint;
++  if (x <= (jdouble) min_jint)
++    return min_jint;
++  return (jint) x;
+ JRT_END
+ 
+ 
+ JRT_LEAF(jlong, SharedRuntime::d2l(jdouble x))
+-  if (g_isnan(x)) {return 0;}
+-  jlong lltmp = (jlong)x;
+-  if (lltmp != min_jlong) {
+-    return lltmp;
+-  } else {
+-    if (x < 0) {
+-      return min_jlong;
+-    } else {
+-      return max_jlong;
+-    }
+-  }
++  if (g_isnan(x))
++    return 0;
++  if (x >= (jdouble) max_jlong)
++    return max_jlong;
++  if (x <= (jdouble) min_jlong)
++    return min_jlong;
++  return (jlong) x;
+ JRT_END
+ 
+ 



More information about the distro-pkg-dev mailing list