mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8217576: C1 atomic access handlers use incorrect decorators
Fix decorator defaulting. Reviewed-by: tschatzl, eosterlund
This commit is contained in:
parent
0761bc5fa8
commit
9f0417b0ae
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1653,7 +1653,7 @@ LIR_Opr LIRGenerator::access_atomic_cmpxchg_at(DecoratorSet decorators, BasicTyp
|
||||||
decorators |= ACCESS_READ;
|
decorators |= ACCESS_READ;
|
||||||
decorators |= ACCESS_WRITE;
|
decorators |= ACCESS_WRITE;
|
||||||
// Atomic operations are SEQ_CST by default
|
// Atomic operations are SEQ_CST by default
|
||||||
decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
|
decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
|
||||||
LIRAccess access(this, decorators, base, offset, type);
|
LIRAccess access(this, decorators, base, offset, type);
|
||||||
if (access.is_raw()) {
|
if (access.is_raw()) {
|
||||||
return _barrier_set->BarrierSetC1::atomic_cmpxchg_at(access, cmp_value, new_value);
|
return _barrier_set->BarrierSetC1::atomic_cmpxchg_at(access, cmp_value, new_value);
|
||||||
|
@ -1667,7 +1667,7 @@ LIR_Opr LIRGenerator::access_atomic_xchg_at(DecoratorSet decorators, BasicType t
|
||||||
decorators |= ACCESS_READ;
|
decorators |= ACCESS_READ;
|
||||||
decorators |= ACCESS_WRITE;
|
decorators |= ACCESS_WRITE;
|
||||||
// Atomic operations are SEQ_CST by default
|
// Atomic operations are SEQ_CST by default
|
||||||
decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
|
decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
|
||||||
LIRAccess access(this, decorators, base, offset, type);
|
LIRAccess access(this, decorators, base, offset, type);
|
||||||
if (access.is_raw()) {
|
if (access.is_raw()) {
|
||||||
return _barrier_set->BarrierSetC1::atomic_xchg_at(access, value);
|
return _barrier_set->BarrierSetC1::atomic_xchg_at(access, value);
|
||||||
|
@ -1681,7 +1681,7 @@ LIR_Opr LIRGenerator::access_atomic_add_at(DecoratorSet decorators, BasicType ty
|
||||||
decorators |= ACCESS_READ;
|
decorators |= ACCESS_READ;
|
||||||
decorators |= ACCESS_WRITE;
|
decorators |= ACCESS_WRITE;
|
||||||
// Atomic operations are SEQ_CST by default
|
// Atomic operations are SEQ_CST by default
|
||||||
decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
|
decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
|
||||||
LIRAccess access(this, decorators, base, offset, type);
|
LIRAccess access(this, decorators, base, offset, type);
|
||||||
if (access.is_raw()) {
|
if (access.is_raw()) {
|
||||||
return _barrier_set->BarrierSetC1::atomic_add_at(access, value);
|
return _barrier_set->BarrierSetC1::atomic_add_at(access, value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue