1756 Node* adr = array_element_address(value, index, T_CHAR); |
1756 Node* adr = array_element_address(value, index, T_CHAR); |
1757 if (adr->is_top()) { |
1757 if (adr->is_top()) { |
1758 return false; |
1758 return false; |
1759 } |
1759 } |
1760 if (is_store) { |
1760 if (is_store) { |
1761 (void) store_to_memory(control(), adr, ch, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered, |
1761 access_store_at(value, adr, TypeAryPtr::BYTES, ch, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED); |
1762 false, false, true /* mismatched */); |
|
1763 } else { |
1762 } else { |
1764 ch = make_load(control(), adr, TypeInt::CHAR, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered, |
1763 ch = access_load_at(value, adr, TypeAryPtr::BYTES, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED | C2_CONTROL_DEPENDENT_LOAD); |
1765 LoadNode::DependsOnlyOnTest, false, false, true /* mismatched */); |
|
1766 set_result(ch); |
1764 set_result(ch); |
1767 } |
1765 } |
1768 return true; |
1766 return true; |
1769 } |
1767 } |
1770 |
1768 |
2510 if (bt == T_ADDRESS) { |
2508 if (bt == T_ADDRESS) { |
2511 // Repackage the long as a pointer. |
2509 // Repackage the long as a pointer. |
2512 val = ConvL2X(val); |
2510 val = ConvL2X(val); |
2513 val = gvn().transform(new CastX2PNode(val)); |
2511 val = gvn().transform(new CastX2PNode(val)); |
2514 } |
2512 } |
2515 access_store_at(control(), heap_base_oop, adr, adr_type, val, value_type, type, decorators); |
2513 access_store_at(heap_base_oop, adr, adr_type, val, value_type, type, decorators); |
2516 } |
2514 } |
2517 |
2515 |
2518 return true; |
2516 return true; |
2519 } |
2517 } |
2520 |
2518 |
2729 } |
2727 } |
2730 |
2728 |
2731 Node* result = NULL; |
2729 Node* result = NULL; |
2732 switch (kind) { |
2730 switch (kind) { |
2733 case LS_cmp_exchange: { |
2731 case LS_cmp_exchange: { |
2734 result = access_atomic_cmpxchg_val_at(control(), base, adr, adr_type, alias_idx, |
2732 result = access_atomic_cmpxchg_val_at(base, adr, adr_type, alias_idx, |
2735 oldval, newval, value_type, type, decorators); |
2733 oldval, newval, value_type, type, decorators); |
2736 break; |
2734 break; |
2737 } |
2735 } |
2738 case LS_cmp_swap_weak: |
2736 case LS_cmp_swap_weak: |
2739 decorators |= C2_WEAK_CMPXCHG; |
2737 decorators |= C2_WEAK_CMPXCHG; |
2740 case LS_cmp_swap: { |
2738 case LS_cmp_swap: { |
2741 result = access_atomic_cmpxchg_bool_at(control(), base, adr, adr_type, alias_idx, |
2739 result = access_atomic_cmpxchg_bool_at(base, adr, adr_type, alias_idx, |
2742 oldval, newval, value_type, type, decorators); |
2740 oldval, newval, value_type, type, decorators); |
2743 break; |
2741 break; |
2744 } |
2742 } |
2745 case LS_get_set: { |
2743 case LS_get_set: { |
2746 result = access_atomic_xchg_at(control(), base, adr, adr_type, alias_idx, |
2744 result = access_atomic_xchg_at(base, adr, adr_type, alias_idx, |
2747 newval, value_type, type, decorators); |
2745 newval, value_type, type, decorators); |
2748 break; |
2746 break; |
2749 } |
2747 } |
2750 case LS_get_add: { |
2748 case LS_get_add: { |
2751 result = access_atomic_add_at(control(), base, adr, adr_type, alias_idx, |
2749 result = access_atomic_add_at(base, adr, adr_type, alias_idx, |
2752 newval, value_type, type, decorators); |
2750 newval, value_type, type, decorators); |
2753 break; |
2751 break; |
2754 } |
2752 } |
2755 default: |
2753 default: |
2756 ShouldNotReachHere(); |
2754 ShouldNotReachHere(); |
4230 |
4228 |
4231 // Copy the fastest available way. |
4229 // Copy the fastest available way. |
4232 // TODO: generate fields copies for small objects instead. |
4230 // TODO: generate fields copies for small objects instead. |
4233 Node* size = _gvn.transform(obj_size); |
4231 Node* size = _gvn.transform(obj_size); |
4234 |
4232 |
4235 access_clone(control(), obj, alloc_obj, size, is_array); |
4233 access_clone(obj, alloc_obj, size, is_array); |
4236 |
4234 |
4237 // Do not let reads from the cloned object float above the arraycopy. |
4235 // Do not let reads from the cloned object float above the arraycopy. |
4238 if (alloc != NULL) { |
4236 if (alloc != NULL) { |
4239 // Do not let stores that initialize this object be reordered with |
4237 // Do not let stores that initialize this object be reordered with |
4240 // a subsequent store that would make this object accessible by |
4238 // a subsequent store that would make this object accessible by |