Skip to content

Commit

Permalink
Add NIAI for exclusive write before CAS read barrier
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Jeremic <fjeremic@ca.ibm.com>
  • Loading branch information
fjeremic committed May 23, 2018
1 parent aad7323 commit c451080
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/compiler/trj9/z/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9756,6 +9756,7 @@ static TR::Register *VMinlineCompareAndSwap(
// Compare-And-Swap on object reference, while primarily is a store operation, it is also an implicit read (it
// reads the existing value to be compared with a provided compare value, before the store itself), hence needs
// a read barrier
generateS390IEInstruction(cg, TR::InstOpCode::NIAI, 1, 0, node);
generateRXYInstruction(cg, guardedLoadMnemonic, node, tempReadBarrier, generateS390MemoryReference(*casMemRef, 0, cg));

cg->stopUsingRegister(tempReadBarrier);
Expand Down

0 comments on commit c451080

Please sign in to comment.