7011490: Wrong computation results in Test6880034
authorvladidan
Thu, 10 Mar 2011 14:56:11 -0500
changeset 8664 3eb3d84f5e07
parent 8655 fec854507832
child 8665 ecc2d7637255
7011490: Wrong computation results in Test6880034 Summary: incorrect handling of c2i deoptimization on little endian architectures Reviewed-by: never
hotspot/src/share/vm/c1/c1_LinearScan.cpp
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Mon Mar 07 16:03:28 2011 -0500
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Thu Mar 10 14:56:11 2011 -0500
@@ -2703,7 +2703,7 @@
       assert(_fpu_stack_allocator != NULL, "must be present");
       opr = _fpu_stack_allocator->to_fpu_stack(opr);
 
-      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrHi is used)");
+      assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrLo is used)");
 #endif
 #ifdef SPARC
       assert(opr->fpu_regnrLo() == opr->fpu_regnrHi() + 1, "assumed in calculation (only fpu_regnrHi is used)");
@@ -2715,7 +2715,12 @@
       assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrHi is used)");
 #endif
 
+#ifdef VM_LITTLE_ENDIAN
+      VMReg rname_first = frame_map()->fpu_regname(opr->fpu_regnrLo());
+#else
       VMReg rname_first = frame_map()->fpu_regname(opr->fpu_regnrHi());
+#endif
+
 #ifdef _LP64
       first = new LocationValue(Location::new_reg_loc(Location::dbl, rname_first));
       second = &_int_0_scope_value;