Skip to content

Commit

Permalink
Merge pull request #7101 from jdmpapin/ram-method-sequence
Browse files Browse the repository at this point in the history
Stop special-casing unevaluated aconst in Power and ARM linkage
  • Loading branch information
dsouzai authored Aug 29, 2023
2 parents 2c797b1 + a336ce0 commit 027fe9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
16 changes: 1 addition & 15 deletions compiler/arm/codegen/OMRLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,21 +399,7 @@ TR::Register *OMR::ARM::Linkage::pushIntegerWordArg(TR::Node *child)

TR::Register *OMR::ARM::Linkage::pushAddressArg(TR::Node *child)
{
TR::CodeGenerator *cg = self()->cg();
TR::Register *pushRegister = NULL;
if (child->getRegister() == NULL && child->getOpCode().isLoadConst())
{
pushRegister = cg->allocateRegister();
if (child->isMethodPointerConstant())
loadAddressConstant(self()->cg(), child, child->getAddress(), pushRegister, NULL, false, TR_RamMethodSequence);
else
loadAddressConstant(self()->cg(), child, child->getAddress(), pushRegister);
}
else
{
pushRegister = cg->evaluate(child);
child->setRegister(pushRegister);
}
TR::Register *pushRegister = self()->cg()->evaluate(child);
child->decReferenceCount();
return pushRegister;
}
Expand Down
16 changes: 1 addition & 15 deletions compiler/p/codegen/OMRLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,22 +723,8 @@ TR::Register *OMR::Power::Linkage::pushIntegerWordArg(TR::Node *child)

TR::Register *OMR::Power::Linkage::pushAddressArg(TR::Node *child)
{
TR::Register *pushRegister = NULL;
TR_ASSERT(child->getDataType() == TR::Address, "assumption violated");
if (child->getRegister() == NULL && child->getOpCode().isLoadConst())
{
pushRegister = self()->cg()->allocateRegister();
if (child->isMethodPointerConstant())
loadAddressConstant(self()->cg(), self()->cg()->comp()->compileRelocatableCode(), child, child->getAddress(), pushRegister, NULL, false, TR_RamMethodSequence);
else
loadAddressConstant(self()->cg(), self()->cg()->comp()->compileRelocatableCode(), child, child->getAddress(), pushRegister);

child->setRegister(pushRegister);
}
else
{
pushRegister = self()->cg()->evaluate(child);
}
TR::Register *pushRegister = self()->cg()->evaluate(child);
self()->cg()->decReferenceCount(child);
return pushRegister;
}
Expand Down

0 comments on commit 027fe9b

Please sign in to comment.