mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7010665: Misplaced membar in C1 implementation of Unsafe.get/putXXX
Modify membars to match regular volatile variable handling Reviewed-by: iveresov, kvn, never
This commit is contained in:
parent
d73624f279
commit
5d2936a29c
1 changed files with 2 additions and 2 deletions
|
@ -1990,9 +1990,8 @@ void LIRGenerator::do_UnsafeGetObject(UnsafeGetObject* x) {
|
|||
|
||||
LIR_Opr reg = reg = rlock_result(x, x->basic_type());
|
||||
|
||||
if (x->is_volatile() && os::is_MP()) __ membar_acquire();
|
||||
get_Object_unsafe(reg, src.result(), off.result(), type, x->is_volatile());
|
||||
if (x->is_volatile() && os::is_MP()) __ membar();
|
||||
if (x->is_volatile() && os::is_MP()) __ membar_acquire();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2014,6 +2013,7 @@ void LIRGenerator::do_UnsafePutObject(UnsafePutObject* x) {
|
|||
|
||||
if (x->is_volatile() && os::is_MP()) __ membar_release();
|
||||
put_Object_unsafe(src.result(), off.result(), data.result(), type, x->is_volatile());
|
||||
if (x->is_volatile() && os::is_MP()) __ membar();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue