Skip to content

Commit

Permalink
Merge pull request #5463 from dchopra001/callUsesHelper
Browse files Browse the repository at this point in the history
Add new callUsesHelperImplementation
  • Loading branch information
fjeremic committed Aug 14, 2020
2 parents b0d762d + ae81f71 commit c84f6f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions compiler/z/codegen/OMRCodeGenerator.hpp
Expand Up @@ -213,6 +213,16 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator
void insertInstructionPrefetchesForCalls(TR_BranchPreloadCallData * data);
bool hasWarmCallsBeforeReturn();

/**
* @brief Answers whether a method call is implemented using an internal runtime
* helper routine (ex. a j2iTransition)
*
* @param[in] sym : The symbol holding the call information
*
* @return : true if the call is represented by a helper; false otherwise.
*/
bool callUsesHelperImplementation(TR::Symbol *sym) { return false; }

/**
* @brief Answers whether a trampoline is required for a direct call instruction to
* reach a target address.
Expand Down
2 changes: 1 addition & 1 deletion compiler/z/codegen/S390Instruction.cpp
Expand Up @@ -2440,7 +2440,7 @@ TR::S390RILInstruction::generateBinaryEncoding()
TR::Symbol *sym = getSymbolReference() ? getSymbolReference()->getSymbol() : NULL;
TR::ResolvedMethodSymbol *resolvedMethodSym = sym ? sym->getResolvedMethodSymbol() : NULL;
TR_ResolvedMethod *resolvedMethod = resolvedMethodSym ? resolvedMethodSym->getResolvedMethod() : NULL;
if (sym && sym->castToMethodSymbol()->isHelper())
if (sym && (sym->castToMethodSymbol()->isHelper() || cg()->callUsesHelperImplementation(sym)))
{
AOTcgDiag1(comp, "add TR_HelperAddress cursor=%x\n", cursor);
cg()->addProjectSpecializedRelocation(cursor+2, (uint8_t*) getSymbolReference(), NULL, TR_HelperAddress,
Expand Down

0 comments on commit c84f6f9

Please sign in to comment.