diff --git a/compiler/il/OMRNode.cpp b/compiler/il/OMRNode.cpp index 4ffedad15c5..1d15f2a1ea9 100644 --- a/compiler/il/OMRNode.cpp +++ b/compiler/il/OMRNode.cpp @@ -7727,3 +7727,27 @@ OMR::Node::isEAEscapeHelperCall() return false; } + + +TR::Node * +OMR::Node::storeToAddressField(TR::Node *obj, TR::SymbolReference *symRef, TR::Node *value) + { + TR::Compilation *comp = TR::comp(); + TR::Node * node; + + if (TR::Compiler->om.writeBarrierType() != gc_modron_wrtbar_none) + { + node = TR::Node::createWithSymRef(TR::awrtbari, 3, 3, obj, value, obj, symRef); + } + else + { + node = TR::Node::createWithSymRef(TR::astorei, 2, 2, obj, value, symRef); + } + + if (comp->useCompressedPointers()) + { + node = TR::Node::createCompressedRefsAnchor(node); + } + + return node; + } diff --git a/compiler/il/OMRNode.hpp b/compiler/il/OMRNode.hpp index b6b3e047a3a..05a7ac675fd 100644 --- a/compiler/il/OMRNode.hpp +++ b/compiler/il/OMRNode.hpp @@ -546,6 +546,25 @@ class OMR_EXTENSIBLE Node */ bool isEAEscapeHelperCall(); + /** + * \brief + * Creates a node for storing into an address field of an object + * + * \parm obj + * Node containing object reference + * + * \parm symRef + * Symbol reference of the address field + * + * \parm value + * Value to store + * + * \return + * Created node + * + */ + static TR::Node * storeToAddressField(TR::Node *obj, TR::SymbolReference *symRef, TR::Node *value); + TR_YesNoMaybe hasBeenRun(); /// Given a monenter node, return the persistent class identifer that's being synchronized