Skip to content

Commit

Permalink
Replace references to findOrCreateRuntimeHelper on Z
Browse files Browse the repository at this point in the history
Use API with default boolean parameters.

Issue: #5601

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Oct 9, 2020
1 parent e5a62de commit 2c37bab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions compiler/z/codegen/FPTreeEvaluator.cpp
Expand Up @@ -874,7 +874,7 @@ OMR::Z::TreeEvaluator::floatRemHelper(TR::Node * node, TR::CodeGenerator * cg)
generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BE, node, labelOK); // it is not < +0
generateRRInstruction(cg, TR::InstOpCode::LCEBR, node, targetRegister, targetRegister); // negate answer to be -0
generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BRC, node, labelOK); // it is not < +0
TR::SymbolReference *helperCallSymRef = cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390jitMathHelperFREM, false, false, false);
TR::SymbolReference *helperCallSymRef = cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390jitMathHelperFREM);
callNode = TR::Node::createWithSymRef(node, TR::fcall, 2, helperCallSymRef);
}
else
Expand All @@ -890,7 +890,7 @@ OMR::Z::TreeEvaluator::floatRemHelper(TR::Node * node, TR::CodeGenerator * cg)
generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BE, node, labelOK); // it is not < +0
generateRRInstruction(cg, TR::InstOpCode::LCDBR, node, targetRegister, targetRegister); // negate answer to be -0
generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BRC, node, labelOK); // it is not < +0
TR::SymbolReference *helperCallSymRef = cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390jitMathHelperDREM, false, false, false);
TR::SymbolReference *helperCallSymRef = cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390jitMathHelperDREM);
callNode = TR::Node::createWithSymRef(node, TR::dcall, 2, helperCallSymRef);
}

Expand Down
8 changes: 4 additions & 4 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Expand Up @@ -3051,7 +3051,7 @@ generateS390CompareAndBranchOpsHelper(TR::Node * node, TR::CodeGenerator * cg, T
TR_S390BinaryCommutativeAnalyser temp(cg);
TR_ASSERT_FATAL(firstChild->getDataType() == secondChild->getDataType(), "Data type of firstChild (%s) and secondChild (%s) should match for generating compare and branch", firstChild->getDataType().toString(), secondChild->getDataType().toString());

// On 64-Bit platforms with compressed references it is possible that one (or both) of the children of the
// On 64-Bit platforms with compressed references it is possible that one (or both) of the children of the
// compare is loading a class from the object (VFT symbol). This symbol is specially treated within the JIT at
// the moment because it is an `aloadi` which loads a 32-bit value (64-bit compressed references) and zero
// extends it to a 64-bit address. Unfortunately the generic analyzers used below are unaware of this fact
Expand Down Expand Up @@ -6122,7 +6122,7 @@ OMR::Z::TreeEvaluator::bstoreEvaluator(TR::Node * node, TR::CodeGenerator * cg)
// If the only consumer is the bstore, then don't bother extending
//
else if (valueChild->getReferenceCount() == 1 && valueChild->getRegister() == NULL &&
(valueChild->getOpCodeValue() == TR::bload ||
(valueChild->getOpCodeValue() == TR::bload ||
valueChild->getOpCodeValue() == TR::bloadi ))
{
sourceRegister = cg->allocateRegister();
Expand Down Expand Up @@ -10138,7 +10138,7 @@ OMR::Z::TreeEvaluator::arraytranslateAndTestEvaluator(TR::Node * node, TR::CodeG
// At first, load up the branch address into raReg, because
// to ensure that no weird spilling happens if the code decides it needs
// to allocate a register at this point for the literal pool base address.
intptr_t helper = (intptr_t) cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayTranslateAndTestHelper, false, false, false)->getMethodAddress();
intptr_t helper = (intptr_t) cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayTranslateAndTestHelper)->getMethodAddress();

TR::LabelSymbol * labelEntryElementChar = generateLabelSymbol(cg);
TR::Instruction * cursor = generateS390LabelInstruction(cg, TR::InstOpCode::LABEL, node, labelEntryElementChar);
Expand Down Expand Up @@ -11961,7 +11961,7 @@ OMR::Z::TreeEvaluator::long2StringEvaluator(TR::Node * node, TR::CodeGenerator *
// At first, load up the branch address into raReg, because
// to ensure that no weird spilling happens if the code decides it needs
// to allocate a register at this point for the literal pool base address.
intptr_t helper = (intptr_t) cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390long2StringHelper,false,false,false)->getMethodAddress();
intptr_t helper = (intptr_t) cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390long2StringHelper)->getMethodAddress();
genLoadAddressConstant(cg, node, helper, raReg);

TR::MemoryReference * workTopMR = generateS390MemoryReference(workReg, 0, cg);
Expand Down
14 changes: 7 additions & 7 deletions compiler/z/codegen/OpMemToMem.cpp
Expand Up @@ -572,25 +572,25 @@ MemInitConstLenMacroOp::generateRemainder()
intptr_t
MemInitVarLenMacroOp::getHelper()
{
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arraySetGeneralHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arraySetGeneralHelper)->getMethodAddress();
}

intptr_t
MemClearVarLenMacroOp::getHelper()
{
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arraySetZeroHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arraySetZeroHelper)->getMethodAddress();
}

intptr_t
MemCpyVarLenMacroOp::getHelper()
{
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayCopyHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayCopyHelper)->getMethodAddress();
}

intptr_t
MemCmpVarLenMacroOp::getHelper()
{
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayCmpHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayCmpHelper)->getMethodAddress();
}

intptr_t
Expand All @@ -599,11 +599,11 @@ BitOpMemVarLenMacroOp::getHelper()
switch(_opcode)
{
case TR::InstOpCode::XC:
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayXORHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayXORHelper)->getMethodAddress();
case TR::InstOpCode::NC:
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayANDHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayANDHelper)->getMethodAddress();
case TR::InstOpCode::OC:
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayORHelper, false, false, false)->getMethodAddress();
return (intptr_t) _cg->symRefTab()->findOrCreateRuntimeHelper(TR_S390arrayORHelper)->getMethodAddress();
default:
TR_ASSERT( 0, "not support");
}
Expand Down

0 comments on commit 2c37bab

Please sign in to comment.