comparison src/share/vm/opto/library_call.cpp @ 17794:3514ee402842

8029101: PPC64 (part 211): ordering of Independent Reads of Independent Writes Reviewed-by: dholmes, kvn Contributed-by: martin.doerr@sap.com
author goetz
date Thu, 16 Jan 2014 14:25:51 +0100
parents 50fdb38839eb
children abec000618bf
comparison
equal deleted inserted replaced
17793:c668f307a4c0 17794:3514ee402842
2625 // volatile membars (for stores; compare Parse::do_put_xxx), which 2625 // volatile membars (for stores; compare Parse::do_put_xxx), which
2626 // we cannot do effectively here because we probably only have a 2626 // we cannot do effectively here because we probably only have a
2627 // rough approximation of type. 2627 // rough approximation of type.
2628 need_mem_bar = true; 2628 need_mem_bar = true;
2629 // For Stores, place a memory ordering barrier now. 2629 // For Stores, place a memory ordering barrier now.
2630 if (is_store) 2630 if (is_store) {
2631 insert_mem_bar(Op_MemBarRelease); 2631 insert_mem_bar(Op_MemBarRelease);
2632 } else {
2633 if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
2634 insert_mem_bar(Op_MemBarVolatile);
2635 }
2636 }
2632 } 2637 }
2633 2638
2634 // Memory barrier to prevent normal and 'unsafe' accesses from 2639 // Memory barrier to prevent normal and 'unsafe' accesses from
2635 // bypassing each other. Happens after null checks, so the 2640 // bypassing each other. Happens after null checks, so the
2636 // exception paths do not take memory state from the memory barrier, 2641 // exception paths do not take memory state from the memory barrier,
2715 } 2720 }
2716 } 2721 }
2717 } 2722 }
2718 2723
2719 if (is_volatile) { 2724 if (is_volatile) {
2720 if (!is_store) 2725 if (!is_store) {
2721 insert_mem_bar(Op_MemBarAcquire); 2726 insert_mem_bar(Op_MemBarAcquire);
2722 else 2727 } else {
2723 insert_mem_bar(Op_MemBarVolatile); 2728 if (!support_IRIW_for_not_multiple_copy_atomic_cpu) {
2729 insert_mem_bar(Op_MemBarVolatile);
2730 }
2731 }
2724 } 2732 }
2725 2733
2726 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); 2734 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder);
2727 2735
2728 return true; 2736 return true;