7009849: C1: Incorrect frame size computation
Summary: Fix frame size computation
Reviewed-by: phh, kvn
--- 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];
}