< prev index next >

src/hotspot/share/gc/shared/c1/barrierSetC1.cpp

Print this page

        

*** 133,152 **** return atomic_add_at_resolved(access, value); } void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) { DecoratorSet decorators = access.decorators(); ! bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses) && os::is_MP(); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; LIRGenerator* gen = access.gen(); if (mask_boolean) { value = gen->mask_boolean(access.base().opr(), value, access.access_emit_info()); } ! if (is_volatile && os::is_MP()) { __ membar_release(); } LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none; if (is_volatile && !needs_patching) { --- 133,152 ---- return atomic_add_at_resolved(access, value); } void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) { DecoratorSet decorators = access.decorators(); ! bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; LIRGenerator* gen = access.gen(); if (mask_boolean) { value = gen->mask_boolean(access.base().opr(), value, access.access_emit_info()); } ! if (is_volatile) { __ membar_release(); } LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none; if (is_volatile && !needs_patching) {
*** 161,171 **** } void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) { LIRGenerator *gen = access.gen(); DecoratorSet decorators = access.decorators(); ! bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses) && os::is_MP(); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; bool in_native = (decorators & IN_NATIVE) != 0; if (support_IRIW_for_not_multiple_copy_atomic_cpu && is_volatile) { --- 161,171 ---- } void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) { LIRGenerator *gen = access.gen(); DecoratorSet decorators = access.decorators(); ! bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses); bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0; bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0; bool in_native = (decorators & IN_NATIVE) != 0; if (support_IRIW_for_not_multiple_copy_atomic_cpu && is_volatile) {
*** 179,189 **** gen->volatile_field_load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info()); } else { __ load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info(), patch_code); } ! if (is_volatile && os::is_MP()) { __ membar_acquire(); } /* Normalize boolean value returned by unsafe operation, i.e., value != 0 ? value = true : value false. */ if (mask_boolean) { --- 179,189 ---- gen->volatile_field_load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info()); } else { __ load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info(), patch_code); } ! if (is_volatile) { __ membar_acquire(); } /* Normalize boolean value returned by unsafe operation, i.e., value != 0 ? value = true : value false. */ if (mask_boolean) {
< prev index next >