mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
7009231: C1: Incorrect CAS code for longs on SPARC 32bit
Fix CAS of longs on SPARC 32bit and cmove on SPARC 64bit. Reviewed-by: kvn
This commit is contained in:
parent
a8a98509e7
commit
43280aa63e
9 changed files with 133 additions and 20 deletions
|
@ -662,7 +662,7 @@ void LIRGenerator::do_AttemptUpdate(Intrinsic* x) {
|
|||
|
||||
// generate conditional move of boolean result
|
||||
LIR_Opr result = rlock_result(x);
|
||||
__ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result);
|
||||
__ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result, T_LONG);
|
||||
}
|
||||
|
||||
|
||||
|
@ -699,10 +699,10 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) {
|
|||
else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
// generate conditional move of boolean result
|
||||
LIR_Opr result = rlock_result(x);
|
||||
__ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result);
|
||||
__ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0),
|
||||
result, as_BasicType(type));
|
||||
if (type == objectType) { // Write-barrier needed for Object fields.
|
||||
// Precise card mark since could either be object or array
|
||||
post_barrier(addr, val.result());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue