Skip to content

Commit

Permalink
Merge pull request #214 from rmnattas/ppcle-picoffset-48
Browse files Browse the repository at this point in the history
Add the correct address as ClassUnloading PicSite in POWER LE
  • Loading branch information
zl-wang authored Oct 11, 2024
2 parents 61b10e6 + d2883d3 commit 56cbcb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/p/codegen/OMRConstantDataSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,11 @@ OMR::ConstantDataSnippet::emitAddressConstant(PPCConstant<intptr_t> *acursor, ui
{
// Register an unload assumption on the lower 32bit of the class constant.
// The patching code thinks it's low bit tagging an instruction not a class pointer!!
int PICOffset = 0; // For LE or BE 32-bit
if (cg()->comp()->target().cpu.isBigEndian() && cg()->comp()->target().is64Bit())
PICOffset = 4;
cg()->
jitAddPicToPatchOnClassUnload((void *)acursor->getConstantValue(), (void *)(codeCursor+((cg()->comp()->target().is64Bit())?4:0)) );
jitAddPicToPatchOnClassUnload((void *)acursor->getConstantValue(), (void *)(codeCursor+PICOffset));
}
}

Expand Down

0 comments on commit 56cbcb6

Please sign in to comment.