Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LIRGenerator.cpp @ 12955:252d541466ea
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
author | morris |
---|---|
date | Fri, 18 Oct 2013 12:15:32 -0700 |
parents | ce0cc25bc5e2 |
children | 5ccbab1c69f3 |
comparison
equal
deleted
inserted
replaced
12954:e3b736cf4fa3 | 12955:252d541466ea |
---|---|
1263 void LIRGenerator::do_getClass(Intrinsic* x) { | 1263 void LIRGenerator::do_getClass(Intrinsic* x) { |
1264 assert(x->number_of_arguments() == 1, "wrong type"); | 1264 assert(x->number_of_arguments() == 1, "wrong type"); |
1265 | 1265 |
1266 LIRItem rcvr(x->argument_at(0), this); | 1266 LIRItem rcvr(x->argument_at(0), this); |
1267 rcvr.load_item(); | 1267 rcvr.load_item(); |
1268 LIR_Opr temp = new_register(T_METADATA); | |
1268 LIR_Opr result = rlock_result(x); | 1269 LIR_Opr result = rlock_result(x); |
1269 | 1270 |
1270 // need to perform the null check on the rcvr | 1271 // need to perform the null check on the rcvr |
1271 CodeEmitInfo* info = NULL; | 1272 CodeEmitInfo* info = NULL; |
1272 if (x->needs_null_check()) { | 1273 if (x->needs_null_check()) { |
1273 info = state_for(x); | 1274 info = state_for(x); |
1274 } | 1275 } |
1275 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), result, info); | 1276 |
1276 __ move_wide(new LIR_Address(result, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result); | 1277 // FIXME T_ADDRESS should actually be T_METADATA but it can't because the |
1278 // meaning of these two is mixed up (see JDK-8026837). | |
1279 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), temp, info); | |
1280 __ move_wide(new LIR_Address(temp, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result); | |
1277 } | 1281 } |
1278 | 1282 |
1279 | 1283 |
1280 // Example: Thread.currentThread() | 1284 // Example: Thread.currentThread() |
1281 void LIRGenerator::do_currentThread(Intrinsic* x) { | 1285 void LIRGenerator::do_currentThread(Intrinsic* x) { |