Skip to content

Commit

Permalink
Use the FMod FCall address directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Mar 25, 2024
1 parent 3192199 commit 23451ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/inc/jithelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
JITHELPER(CORINFO_HELP_DBL2UINT_OVF, JIT_Dbl2UIntOvf, CORINFO_HELP_SIG_8_STACK)
JITHELPER(CORINFO_HELP_DBL2ULNG, JIT_Dbl2ULng, CORINFO_HELP_SIG_8_STACK)
JITHELPER(CORINFO_HELP_DBL2ULNG_OVF, JIT_Dbl2ULngOvf, CORINFO_HELP_SIG_8_STACK)
DYNAMICJITHELPER(CORINFO_HELP_FLTREM, NULL, CORINFO_HELP_SIG_8_STACK)
DYNAMICJITHELPER(CORINFO_HELP_DBLREM, NULL, CORINFO_HELP_SIG_16_STACK)
JITHELPER(CORINFO_HELP_FLTREM, COMSingle::FMod, CORINFO_HELP_SIG_8_STACK)
JITHELPER(CORINFO_HELP_DBLREM, COMDouble::FMod, CORINFO_HELP_SIG_16_STACK)
DYNAMICJITHELPER(CORINFO_HELP_FLTROUND, NULL, CORINFO_HELP_SIG_8_STACK)
DYNAMICJITHELPER(CORINFO_HELP_DBLROUND, NULL, CORINFO_HELP_SIG_16_STACK)

Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/vm/corelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,9 @@ DEFINE_CLASS(UINT128, System, UInt128)

DEFINE_CLASS(MATH, System, Math)
DEFINE_METHOD(MATH, ROUND, Round, SM_Dbl_RetDbl)
DEFINE_METHOD(MATH, FMOD, FMod, NoSig)

DEFINE_CLASS(MATHF, System, MathF)
DEFINE_METHOD(MATHF, ROUND, Round, SM_Flt_RetFlt)
DEFINE_METHOD(MATHF, FMOD, FMod, NoSig)

DEFINE_CLASS(DYNAMICMETHOD, ReflectionEmit, DynamicMethod)

Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/vm/ecall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ void ECall::PopulateManagedHelpers()
pDest = pMD->GetMultiCallableAddrOfCode();
SetJitHelperFunction(CORINFO_HELP_MEMCPY, pDest);

pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__MATH__FMOD));
pDest = pMD->GetMultiCallableAddrOfCode();
SetJitHelperFunction(CORINFO_HELP_DBLREM, pDest);

pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__MATHF__FMOD));
pDest = pMD->GetMultiCallableAddrOfCode();
SetJitHelperFunction(CORINFO_HELP_FLTREM, pDest);

pMD = CoreLibBinder::GetMethod((BinderMethodID)(METHOD__MATH__ROUND));
pDest = pMD->GetMultiCallableAddrOfCode();
SetJitHelperFunction(CORINFO_HELP_DBLROUND, pDest);
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/vm/jithelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@

#include "exinfo.h"

#include "floatsingle.h"
#include "floatdouble.h"

//========================================================================
//
// This file contains implementation of all JIT helpers. The helpers are
Expand Down

0 comments on commit 23451ea

Please sign in to comment.