Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp Tue Jan 07 17:24:59 2014 +0100 +++ b/src/share/vm/opto/library_call.cpp Thu Jan 16 14:25:51 2014 +0100 @@ -2627,8 +2627,13 @@ // rough approximation of type. need_mem_bar = true; // For Stores, place a memory ordering barrier now. - if (is_store) + if (is_store) { insert_mem_bar(Op_MemBarRelease); + } else { + if (support_IRIW_for_not_multiple_copy_atomic_cpu) { + insert_mem_bar(Op_MemBarVolatile); + } + } } // Memory barrier to prevent normal and 'unsafe' accesses from @@ -2717,10 +2722,13 @@ } if (is_volatile) { - if (!is_store) + if (!is_store) { insert_mem_bar(Op_MemBarAcquire); - else - insert_mem_bar(Op_MemBarVolatile); + } else { + if (!support_IRIW_for_not_multiple_copy_atomic_cpu) { + insert_mem_bar(Op_MemBarVolatile); + } + } } if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder);