Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate part of OMR::ResolvedMethodSymbol constructor to OpenJ9 #3867

Merged
merged 1 commit into from
May 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 11 additions & 109 deletions compiler/il/symbol/OMRResolvedMethodSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,117 +171,19 @@ OMR::ResolvedMethodSymbol::ResolvedMethodSymbol(TR_ResolvedMethod * method, TR::
self()->setMethodAddress(_resolvedMethod->startAddressForJittedMethod());
}

#ifdef J9_PROJECT_SPECIFIC
if ((TR::Compiler->target.cpu.getSupportsHardwareRound() &&
((_resolvedMethod->getRecognizedMethod() == TR::java_lang_Math_floor) ||
(_resolvedMethod->getRecognizedMethod() == TR::java_lang_StrictMath_floor) ||
(_resolvedMethod->getRecognizedMethod() == TR::java_lang_Math_ceil) ||
(_resolvedMethod->getRecognizedMethod() == TR::java_lang_StrictMath_ceil))) ||
(TR::Compiler->target.cpu.getSupportsHardwareSQRT() &&
((_resolvedMethod->getRecognizedMethod() == TR::java_lang_Math_sqrt) ||
(_resolvedMethod->getRecognizedMethod() == TR::java_lang_StrictMath_sqrt))) ||
(TR::Compiler->target.cpu.getSupportsHardwareCopySign() &&
((_resolvedMethod->getRecognizedMethod() == TR::java_lang_Math_copySign_F) ||
(_resolvedMethod->getRecognizedMethod() == TR::java_lang_Math_copySign_D))))
{
self()->setCanReplaceWithHWInstr(true);
}

if (_resolvedMethod->isJNINative())
{
self()->setJNI();
#if defined(TR_TARGET_POWER)
switch(_resolvedMethod->getRecognizedMethod())
{
case TR::java_lang_Math_acos:
case TR::java_lang_Math_asin:
case TR::java_lang_Math_atan:
case TR::java_lang_Math_atan2:
case TR::java_lang_Math_cbrt:
case TR::java_lang_Math_ceil:
case TR::java_lang_Math_copySign_F:
case TR::java_lang_Math_copySign_D:
case TR::java_lang_Math_cos:
case TR::java_lang_Math_cosh:
case TR::java_lang_Math_exp:
case TR::java_lang_Math_expm1:
case TR::java_lang_Math_floor:
case TR::java_lang_Math_hypot:
case TR::java_lang_Math_IEEEremainder:
case TR::java_lang_Math_log:
case TR::java_lang_Math_log10:
case TR::java_lang_Math_log1p:
case TR::java_lang_Math_max_F:
case TR::java_lang_Math_max_D:
case TR::java_lang_Math_min_F:
case TR::java_lang_Math_min_D:
case TR::java_lang_Math_nextAfter_F:
case TR::java_lang_Math_nextAfter_D:
case TR::java_lang_Math_pow:
case TR::java_lang_Math_rint:
case TR::java_lang_Math_round_F:
case TR::java_lang_Math_round_D:
case TR::java_lang_Math_scalb_F:
case TR::java_lang_Math_scalb_D:
case TR::java_lang_Math_sin:
case TR::java_lang_Math_sinh:
case TR::java_lang_Math_sqrt:
case TR::java_lang_Math_tan:
case TR::java_lang_Math_tanh:
case TR::java_lang_StrictMath_acos:
case TR::java_lang_StrictMath_asin:
case TR::java_lang_StrictMath_atan:
case TR::java_lang_StrictMath_atan2:
case TR::java_lang_StrictMath_cbrt:
case TR::java_lang_StrictMath_ceil:
case TR::java_lang_StrictMath_copySign_F:
case TR::java_lang_StrictMath_copySign_D:
case TR::java_lang_StrictMath_cos:
case TR::java_lang_StrictMath_cosh:
case TR::java_lang_StrictMath_exp:
case TR::java_lang_StrictMath_expm1:
case TR::java_lang_StrictMath_floor:
case TR::java_lang_StrictMath_hypot:
case TR::java_lang_StrictMath_IEEEremainder:
case TR::java_lang_StrictMath_log:
case TR::java_lang_StrictMath_log10:
case TR::java_lang_StrictMath_log1p:
case TR::java_lang_StrictMath_max_F:
case TR::java_lang_StrictMath_max_D:
case TR::java_lang_StrictMath_min_F:
case TR::java_lang_StrictMath_min_D:
case TR::java_lang_StrictMath_nextAfter_F:
case TR::java_lang_StrictMath_nextAfter_D:
case TR::java_lang_StrictMath_pow:
case TR::java_lang_StrictMath_rint:
case TR::java_lang_StrictMath_round_F:
case TR::java_lang_StrictMath_round_D:
case TR::java_lang_StrictMath_scalb_F:
case TR::java_lang_StrictMath_scalb_D:
case TR::java_lang_StrictMath_sin:
case TR::java_lang_StrictMath_sinh:
case TR::java_lang_StrictMath_sqrt:
case TR::java_lang_StrictMath_tan:
case TR::java_lang_StrictMath_tanh:
setCanDirectNativeCall(true);
break;
default:
break;
}
#endif // TR_TARGET_POWER
}
else
#endif // J9_PROJECT_SPECIFIC
if (_resolvedMethod->isNative())
if (!_resolvedMethod->isJNINative())
{
if (!self()->isInterpreted() && _resolvedMethod->isJITInternalNative())
{
self()->setMethodAddress(_resolvedMethod->startAddressForJITInternalNativeMethod());
self()->setJITInternalNative();
}
else
if (_resolvedMethod->isNative())
{
self()->setVMInternalNative();
if (!self()->isInterpreted() && _resolvedMethod->isJITInternalNative())
{
self()->setMethodAddress(_resolvedMethod->startAddressForJITInternalNativeMethod());
self()->setJITInternalNative();
}
else
{
self()->setVMInternalNative();
}
}
}

Expand Down