Skip to content

Commit

Permalink
Merge pull request #13959 from knn-k/aarch64FixWrtBar_0.29.1
Browse files Browse the repository at this point in the history
(0.29.1) AArch64: Load heap size from vmstruct on AOT compilation
  • Loading branch information
pshipton authored Nov 19, 2021
2 parents d9ff2ac + a13784e commit 9a13b0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ VMnonNullSrcWrtBarCardCheckEvaluator(
}
generateTrg1Src2Instruction(cg, TR::InstOpCode::subx, node, temp1Reg, dstReg, temp1Reg);

if (comp->getOptions()->isVariableHeapSizeForBarrierRange0())
if (comp->getOptions()->isVariableHeapSizeForBarrierRange0() || comp->compileRelocatableCode())
{
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrimmx, node, temp2Reg, new (cg->trHeapMemory()) TR::MemoryReference(metaReg, offsetof(J9VMThread, heapSizeForBarrierRange0), cg));
}
Expand Down Expand Up @@ -463,7 +463,7 @@ VMnonNullSrcWrtBarCardCheckEvaluator(
// If doCrdMrk is false, then temp2Reg still contains heapSize
if (doCrdMrk)
{
if (comp->getOptions()->isVariableHeapSizeForBarrierRange0())
if (comp->getOptions()->isVariableHeapSizeForBarrierRange0() || comp->compileRelocatableCode())
{
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrimmx, node, temp2Reg, new (cg->trHeapMemory()) TR::MemoryReference(metaReg, offsetof(J9VMThread, heapSizeForBarrierRange0), cg));
}
Expand Down Expand Up @@ -577,7 +577,7 @@ VMCardCheckEvaluator(
// If we know the object is definitely in heap, then we skip the check.
if (!node->isHeapObjectWrtBar())
{
if (comp->getOptions()->isVariableHeapSizeForBarrierRange0())
if (comp->getOptions()->isVariableHeapSizeForBarrierRange0() || comp->compileRelocatableCode())
{
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrimmx, node, temp2Reg, new (cg->trHeapMemory()) TR::MemoryReference(metaReg, offsetof(J9VMThread, heapSizeForBarrierRange0), cg));
}
Expand Down

0 comments on commit 9a13b0b

Please sign in to comment.