2667 // around 5701, class sun/reflect/UnsafeBooleanFieldAccessorImpl. |
2667 // around 5701, class sun/reflect/UnsafeBooleanFieldAccessorImpl. |
2668 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); |
2668 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); |
2669 |
2669 |
2670 if (!is_store) { |
2670 if (!is_store) { |
2671 MemNode::MemOrd mo = is_volatile ? MemNode::acquire : MemNode::unordered; |
2671 MemNode::MemOrd mo = is_volatile ? MemNode::acquire : MemNode::unordered; |
2672 Node* p = make_load(control(), adr, value_type, type, adr_type, mo, is_volatile); |
2672 // To be valid, unsafe loads may depend on other conditions than |
|
2673 // the one that guards them: pin the Load node |
|
2674 Node* p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, is_volatile); |
2673 // load value |
2675 // load value |
2674 switch (type) { |
2676 switch (type) { |
2675 case T_BOOLEAN: |
2677 case T_BOOLEAN: |
2676 case T_CHAR: |
2678 case T_CHAR: |
2677 case T_BYTE: |
2679 case T_BYTE: |
6036 if (support_IRIW_for_not_multiple_copy_atomic_cpu && is_vol) { |
6038 if (support_IRIW_for_not_multiple_copy_atomic_cpu && is_vol) { |
6037 insert_mem_bar(Op_MemBarVolatile); // StoreLoad barrier |
6039 insert_mem_bar(Op_MemBarVolatile); // StoreLoad barrier |
6038 } |
6040 } |
6039 // Build the load. |
6041 // Build the load. |
6040 MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; |
6042 MemNode::MemOrd mo = is_vol ? MemNode::acquire : MemNode::unordered; |
6041 Node* loadedField = make_load(NULL, adr, type, bt, adr_type, mo, is_vol); |
6043 Node* loadedField = make_load(NULL, adr, type, bt, adr_type, mo, LoadNode::DependsOnlyOnTest, is_vol); |
6042 // If reference is volatile, prevent following memory ops from |
6044 // If reference is volatile, prevent following memory ops from |
6043 // floating up past the volatile read. Also prevents commoning |
6045 // floating up past the volatile read. Also prevents commoning |
6044 // another volatile read. |
6046 // another volatile read. |
6045 if (is_vol) { |
6047 if (is_vol) { |
6046 // Memory barrier includes bogus read of value to force load BEFORE membar |
6048 // Memory barrier includes bogus read of value to force load BEFORE membar |