Skip to content

Commit

Permalink
Stop special-casing unevaluated aconst in Power and ARM linkage
Browse files Browse the repository at this point in the history
Instead, simply evaluate it like we do for other arguments.

These were the only two places where a TR_RamMethodSequence relocation
could be generated for a method other than the outermost method, which
is not expected. All remaining uses of TR_RamMethodSequence are for
compiledMethodSymbol, which always represents the outermost method.
  • Loading branch information
jdmpapin committed Aug 29, 2023
1 parent d44b9a1 commit a336ce0
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 a336ce0

Please sign in to comment.