Skip to content

Commit

Permalink
Merge pull request #3567 from aviansie-ben/power-aot-wide-offsets
Browse files Browse the repository at this point in the history
Fix check for whether wide relocation offsets are needed on Power
  • Loading branch information
0xdaryl authored Feb 14, 2019
2 parents 0590d62 + a0a3a7d commit f9a06b0
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions compiler/codegen/Relocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,7 @@ uint8_t TR::ExternalRelocation::collectModifier()
{
TR::Compilation *comp = TR::comp();
uint8_t * relocatableMethodCodeStart = (uint8_t *)comp->getRelocatableMethodCodeStart();
uint8_t * updateLocation;

if (TR::Compiler->target.cpu.isPower() &&
(_kind == TR_ArrayCopyHelper || _kind == TR_ArrayCopyToc || _kind == TR_RamMethod || _kind == TR_GlobalValue || _kind == TR_BodyInfoAddressLoad || _kind == TR_DataAddress || _kind == TR_JNISpecialTargetAddress || _kind == TR_JNIStaticTargetAddress || _kind == TR_JNIVirtualTargetAddress
|| _kind == TR_StaticRamMethodConst || _kind == TR_VirtualRamMethodConst || _kind == TR_SpecialRamMethodConst || _kind == TR_DebugCounter))
{
TR::Instruction *instr = (TR::Instruction *)getUpdateLocation();
updateLocation = instr->getBinaryEncoding();
}
else
{
updateLocation = getUpdateLocation();
}
uint8_t * updateLocation = getUpdateLocation();

int32_t distanceFromStartOfBuffer = updateLocation - relocatableMethodCodeStart;
int32_t distanceFromStartOfMethod = updateLocation - comp->cg()->getCodeStart();
Expand Down

0 comments on commit f9a06b0

Please sign in to comment.