Skip to content

Commit

Permalink
Merge pull request #5518 from dchopra001/mpcLARL
Browse files Browse the repository at this point in the history
Use Snippet to load methodPointer in remote compile
  • Loading branch information
fjeremic authored Sep 3, 2020
2 parents 6bb4e60 + e855952 commit 5f5f8a1
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,16 @@ genLoadAddressConstant(TR::CodeGenerator * cg, TR::Node * node, uintptr_t value,
if (node->isClassUnloadingConst())
{
uintptr_t value = node->getAddress();
TR::Instruction *unloadableConstInstr = generateRILInstruction(cg, TR::InstOpCode::LARL, node, targetRegister, reinterpret_cast<void*>(value));
TR_OpaqueClassBlock* unloadableClass = NULL;
TR::Instruction *unloadableConstInstr = NULL;
if (cg->canUseRelativeLongInstructions(value))
{
unloadableConstInstr = generateRILInstruction(cg, TR::InstOpCode::LARL, node, targetRegister, reinterpret_cast<void*>(value));
}
else
{
unloadableConstInstr = genLoadAddressConstantInSnippet(cg, node, value, targetRegister, NULL, NULL, NULL, true);
}

if (node->isMethodPointerConstant())
{
comp->getStaticMethodPICSites()->push_front(unloadableConstInstr);
Expand Down Expand Up @@ -4931,7 +4939,15 @@ aloadHelper(TR::Node * node, TR::CodeGenerator * cg, TR::MemoryReference * tempM
&& constNode->isClassUnloadingConst())
{
uintptr_t value = constNode->getAddress();
TR::Instruction *unloadableConstInstr = generateRILInstruction(cg, TR::InstOpCode::LARL, node, tempReg, reinterpret_cast<void*>(value));
TR::Instruction *unloadableConstInstr = NULL;
if (cg->canUseRelativeLongInstructions(value))
{
unloadableConstInstr = generateRILInstruction(cg, TR::InstOpCode::LARL, node, tempReg, reinterpret_cast<void*>(value));
}
else
{
unloadableConstInstr = genLoadAddressConstantInSnippet(cg, node, value, tempReg, NULL, NULL, NULL, true);
}
TR_OpaqueClassBlock* unloadableClass = NULL;
if (constNode->isMethodPointerConstant())
{
Expand Down

0 comments on commit 5f5f8a1

Please sign in to comment.