Skip to content

Commit

Permalink
AArch64: Fix memory reference to kill registers properly
Browse files Browse the repository at this point in the history
When the node of memory reference is `aconst`/`iconst`/`lconst`,
a base register may not be killed in `decNodeReferenceCounts`
because both `_baseRegister` and `_baseNode` are not NULL.

Signed-off-by: Akira Saitoh <saiaki@jp.ibm.com>
  • Loading branch information
Akira Saitoh committed Sep 3, 2020
1 parent c7312b8 commit 7c33de9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions compiler/aarch64/codegen/OMRMemoryReference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,7 @@ void OMR::ARM64::MemoryReference::populateMemoryReference(TR::Node *subTree, TR:
{
intptr_t amount = (subTree->getOpCodeValue() == TR::iconst) ?
subTree->getInt() : subTree->getLongInt();
if (_baseRegister != NULL)
{
self()->addToOffset(subTree, amount, cg);
}
else
{
_baseRegister = cg->allocateRegister();
_baseNode = subTree;
self()->setBaseModifiable();
loadConstant64(cg, subTree, amount, _baseRegister);
}
self()->addToOffset(subTree, amount, cg);
}
else
{
Expand Down

0 comments on commit 7c33de9

Please sign in to comment.