Skip to content

Commit

Permalink
Merge pull request #16946 from IBMJimmyk/jitReportInstanceFieldWrite-37
Browse files Browse the repository at this point in the history
(0.37) Fixing wrong address elementSize calculation
  • Loading branch information
pshipton committed Mar 18, 2023
2 parents c296ac9 + bc9d396 commit 5a17282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/compiler/p/codegen/J9TreeEvaluator.cpp
Expand Up @@ -1096,7 +1096,7 @@ void generateReportFieldAccessOutlinedInstructions(TR::Node *node, TR::LabelSymb
if (isWrite)
{
TR::DataType dt = node->getDataType();
int32_t elementSize = dt == TR::Address ? TR::Compiler->om.sizeofReferenceField() : TR::Symbol::convertTypeToSize(dt);
int32_t elementSize = TR::Symbol::convertTypeToSize(dt);
TR::InstOpCode::Mnemonic storeOp = getLoadOrStoreFromDataType(cg, dt, elementSize, node->getOpCode().isUnsigned(), false);
TR::SymbolReference *location = cg->allocateLocalTemp(dt);
TR::MemoryReference *valueMR = TR::MemoryReference::createWithSymRef(cg, node, location, node->getSize());
Expand Down Expand Up @@ -1263,7 +1263,7 @@ J9::Power::TreeEvaluator::generateTestAndReportFieldWatchInstructions(TR::CodeGe
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::andi_r, node, scratchReg, scratchReg, cndReg, J9ClassHasWatchedFields);
generateConditionalBranchInstruction(cg, TR::InstOpCode::bne, node, fieldReportLabel, cndReg);

generateReportOOL->swapInstructionListsWithCompilation();
generateReportOOL->swapInstructionListsWithCompilation();

generateLabelInstruction(cg, TR::InstOpCode::label, node, fieldReportLabel);
generateReportFieldAccessOutlinedInstructions(node, endLabel, dataSnippetRegister, isWrite, cg, sideEffectRegister, valueReg);
Expand Down

0 comments on commit 5a17282

Please sign in to comment.