Skip to content

Commit

Permalink
Add an unresolved check for mapOpCode() P10 prefix-instr mapping
Browse files Browse the repository at this point in the history
The current code for patching unresolved addresses does not handles
P10's 8byte prefix instructions, this commit adds a check to mapOpCode
to not map memory instruction to prefix-instr in P10 if the reference
is to an unresolved symbol.

Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
  • Loading branch information
rmnattas committed Sep 17, 2021
1 parent c818b04 commit df2f617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/p/codegen/OMRMemoryReference.cpp
Expand Up @@ -1125,7 +1125,7 @@ void OMR::Power::MemoryReference::mapOpCode(TR::Instruction *currentInstruction)
break;
}
}
else if ((self()->getOffset() < LOWER_IMMED || self()->getOffset() > UPPER_IMMED || self()->getLabel()) && currentInstruction->cg()->comp()->target().cpu.isAtLeast(OMR_PROCESSOR_PPC_P10))
else if ((self()->getUnresolvedSnippet() == NULL) && (self()->getOffset() < LOWER_IMMED || self()->getOffset() > UPPER_IMMED || self()->getLabel()) && currentInstruction->cg()->comp()->target().cpu.isAtLeast(OMR_PROCESSOR_PPC_P10))
{
switch (currentInstruction->getOpCodeValue())
{
Expand Down

0 comments on commit df2f617

Please sign in to comment.