7009849: C1: Incorrect frame size computation
authoriveresov
Thu, 30 Dec 2010 23:44:45 -0800
changeset 7717 2c1b91209f0f
parent 7716 e57441562769
child 7718 23502bf34686
child 7883 f29abf6b3466
child 8065 7ca689ce3d32
7009849: C1: Incorrect frame size computation Summary: Fix frame size computation Reviewed-by: phh, kvn
hotspot/src/share/vm/c1/c1_FrameMap.cpp
--- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Thu Dec 30 09:36:03 2010 -0800
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp	Thu Dec 30 23:44:45 2010 -0800
@@ -92,7 +92,7 @@
     if (opr->is_address()) {
       LIR_Address* addr = opr->as_address_ptr();
       assert(addr->disp() == (int)addr->disp(), "out of range value");
-      out_preserve = MAX2(out_preserve, (intptr_t)addr->disp() / 4);
+      out_preserve = MAX2(out_preserve, (intptr_t)(addr->disp() - STACK_BIAS) / 4);
     }
     i += type2size[t];
   }
@@ -143,7 +143,7 @@
     args->append(opr);
     if (opr->is_address()) {
       LIR_Address* addr = opr->as_address_ptr();
-      out_preserve = MAX2(out_preserve, (intptr_t)addr->disp() / 4);
+      out_preserve = MAX2(out_preserve, (intptr_t)(addr->disp() - STACK_BIAS) / 4);
     }
     i += type2size[t];
   }