Skip to content

Commit

Permalink
AArch64: Add code for compressed refs to memory reference
Browse files Browse the repository at this point in the history
This commit adds code to support compressed references to
`OMR::ARM64::MemoryReference::populateMemoryRefernce`.

Signed-off-by: Akira Saitoh <saiaki@jp.ibm.com>
  • Loading branch information
Akira1Saitoh committed Jan 24, 2020
1 parent ab53ed3 commit b64b701
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compiler/aarch64/codegen/OMRMemoryReference.cpp
Expand Up @@ -391,6 +391,15 @@ void OMR::ARM64::MemoryReference::decNodeReferenceCounts(TR::CodeGenerator *cg)

void OMR::ARM64::MemoryReference::populateMemoryReference(TR::Node *subTree, TR::CodeGenerator *cg)
{
if (cg->comp()->useCompressedPointers())
{
if (subTree->getOpCodeValue() == TR::l2a && subTree->getReferenceCount() == 1 && subTree->getRegister() == NULL)
{
cg->decReferenceCount(subTree);
subTree = subTree->getFirstChild();
}
}

if (subTree->getReferenceCount() > 1 || subTree->getRegister() != NULL)
{
if (_baseRegister != NULL)
Expand Down

0 comments on commit b64b701

Please sign in to comment.