changeset 1169:002c8f181f67

2008-11-03 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp (BytecodeInterpreter::VMintShl): Only shift by the lower five bits. (BytecodeInterpreter::VMintShr): Likewise. (BytecodeInterpreter::VMintUshr): Likewise.
author Gary Benson <gbenson@redhat.com>
date Mon, 03 Nov 2008 08:30:13 -0500
parents a5e8efb4fcff
children f58ec27b8941
files ChangeLog ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 31 15:19:14 2008 -0400
+++ b/ChangeLog	Mon Nov 03 08:30:13 2008 -0500
@@ -1,3 +1,10 @@
+2008-11-03  Gary Benson  <gbenson@redhat.com>
+
+	* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp
+	(BytecodeInterpreter::VMintShl): Only shift by the lower five bits.
+	(BytecodeInterpreter::VMintShr): Likewise.
+	(BytecodeInterpreter::VMintUshr): Likewise.
+
 2008-10-31  Deepak Bhole  <dbhole@redhat.com>
 
 	* IcedTeaPlugin.cc: Fix potential DoS issue when dealing with very long
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp	Fri Oct 31 15:19:14 2008 -0400
+++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp	Mon Nov 03 08:30:13 2008 -0500
@@ -82,7 +82,6 @@
 }
 
 inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
-  // CVM did this 0x3f mask, is the really needed??? QQQ
   return ((unsigned long long) op1) >> (op2 & 0x3F);
 }
 
@@ -237,11 +236,11 @@
 }
 
 inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) {
-  return op1 <<  op2;
+  return op1 << (op2 & 0x1F);
 }
 
 inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
-  return op1 >>  op2; // QQ op2 & 0x1f??
+  return op1 >> (op2 & 0x1F);
 }
 
 inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
@@ -249,7 +248,7 @@
 }
 
 inline jint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
-  return ((juint) op1) >> op2; // QQ op2 & 0x1f??
+  return ((juint) op1) >> (op2 & 0x1F);
 }
 
 inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {