Skip to content

Commit

Permalink
Override isILOpCodeSupported on x86
Browse files Browse the repository at this point in the history
Now that we have an evaluator for each and every IL opcode, we can no
longer compare against `unImpOpEvaluator` or `badILOpEvaluator` to
determine whether we have implemented an evaluator for that specific IL.

Instead we have to override this function and manually return false
for the specific set of unimplemented opcodes.
  • Loading branch information
fjeremic committed May 26, 2021
1 parent f17e0de commit 6966969
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compiler/x/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,18 @@ OMR::X86::CodeGenerator::supportsNonHelper(TR::SymbolReferenceTable::CommonNonhe
}
}

bool
OMR::X86::CodeGenerator::isILOpCodeSupported(TR::ILOpCodes o)
{
switch(o)
{
case TR::a2i:
return false;
default:
return OMR::CodeGenerator::isILOpCodeSupported(o);
}
}

TR::RealRegister *
OMR::X86::CodeGenerator::getMethodMetaDataRegister()
{
Expand Down
2 changes: 2 additions & 0 deletions compiler/x/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator
virtual bool getSupportsBitPermute();

bool supportsNonHelper(TR::SymbolReferenceTable::CommonNonhelperSymbol symbol);

static bool isILOpCodeSupported(TR::ILOpCodes);

bool hasTMEvaluator() {return true;}

Expand Down

0 comments on commit 6966969

Please sign in to comment.