Mercurial > hg > truffle
diff src/share/vm/c1/c1_LIRGenerator.cpp @ 4966:701a83c86f28
7120481: storeStore barrier in constructor with final field
Summary: Issue storestore barrier before constructor return if the constructor write final field.
Reviewed-by: dholmes, jrose, roland, coleenp
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Tue, 21 Feb 2012 13:14:55 -0500 |
parents | 9164b8236699 |
children | 33df1aeaebbf 0105f367a14c |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRGenerator.cpp Wed Feb 22 14:00:34 2012 -0500 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp Tue Feb 21 13:14:55 2012 -0500 @@ -3165,3 +3165,20 @@ } return result; } + +void LIRGenerator::do_MemBar(MemBar* x) { + if (os::is_MP()) { + LIR_Code code = x->code(); + switch(code) { + case lir_membar_acquire : __ membar_acquire(); break; + case lir_membar_release : __ membar_release(); break; + case lir_membar : __ membar(); break; + case lir_membar_loadload : __ membar_loadload(); break; + case lir_membar_storestore: __ membar_storestore(); break; + case lir_membar_loadstore : __ membar_loadstore(); break; + case lir_membar_storeload : __ membar_storeload(); break; + default : ShouldNotReachHere(); break; + } + } +} +