aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/c1
diff options
context:
space:
mode:
authormorris <none@none>2013-10-18 12:15:32 -0700
committermorris <none@none>2013-10-18 12:15:32 -0700
commita1a245c428f3db760409c12acadaaba20766b901 (patch)
treef28fde28f5b1d4371a69eeef4d050dfb5b00e246 /src/share/vm/c1
parent2f77915a4df2d52cd856d3cec5cc12c0203582d0 (diff)
8008242: VerifyOops is broken on SPARC
Summary: Fixed displacement issues in SPARC macroassembler and ensure that getClass intrinsic temporary result is T_METADATA Reviewed-by: kvn, twisti
Diffstat (limited to 'src/share/vm/c1')
-rw-r--r--src/share/vm/c1/c1_LIRGenerator.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/share/vm/c1/c1_LIRGenerator.cpp b/src/share/vm/c1/c1_LIRGenerator.cpp
index 40bccf8ef..7b773b7a1 100644
--- a/src/share/vm/c1/c1_LIRGenerator.cpp
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp
@@ -1265,6 +1265,7 @@ void LIRGenerator::do_getClass(Intrinsic* x) {
LIRItem rcvr(x->argument_at(0), this);
rcvr.load_item();
+ LIR_Opr temp = new_register(T_METADATA);
LIR_Opr result = rlock_result(x);
// need to perform the null check on the rcvr
@@ -1272,8 +1273,11 @@ void LIRGenerator::do_getClass(Intrinsic* x) {
if (x->needs_null_check()) {
info = state_for(x);
}
- __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), result, info);
- __ move_wide(new LIR_Address(result, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result);
+
+ // FIXME T_ADDRESS should actually be T_METADATA but it can't because the
+ // meaning of these two is mixed up (see JDK-8026837).
+ __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), temp, info);
+ __ move_wide(new LIR_Address(temp, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result);
}