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

Remove kDivideByZeroException from jithelpers #109488

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/coreclr/vm/i386/excepx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ CPFH_UnwindHandler(EXCEPTION_RECORD *pExceptionRecord,
EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
{
WRAPPER_NO_CONTRACT;
_ASSERTE(!DebugIsEECxxException(pExceptionRecord) && "EE C++ Exception leaked into managed code!");
// _ASSERTE(!DebugIsEECxxException(pExceptionRecord) && "EE C++ Exception leaked into managed code!");

STRESS_LOG5(LF_EH, LL_INFO100, "In COMPlusFrameHandler EH code = %x flag = %x EIP = %x with ESP = %x, pEstablisherFrame = 0x%p\n",
pExceptionRecord->ExceptionCode, pExceptionRecord->ExceptionFlags,
Expand Down
18 changes: 9 additions & 9 deletions src/coreclr/vm/jithelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ HCIMPL2(INT32, JIT_Div, INT32 dividend, INT32 divisor)
return(dividend / divisor);

ThrowExcep:
FCThrow(ehKind);
COMPlusThrow(ehKind);
}
HCIMPLEND

Expand Down Expand Up @@ -187,7 +187,7 @@ HCIMPL2(INT32, JIT_Mod, INT32 dividend, INT32 divisor)
return(dividend % divisor);

ThrowExcep:
FCThrow(ehKind);
COMPlusThrow(ehKind);
}
HCIMPLEND

Expand All @@ -197,7 +197,7 @@ HCIMPL2(UINT32, JIT_UDiv, UINT32 dividend, UINT32 divisor)
FCALL_CONTRACT;

if (divisor == 0)
FCThrow(kDivideByZeroException);
COMPlusThrow(kDivideByZeroException);

return(dividend / divisor);
}
Expand All @@ -209,7 +209,7 @@ HCIMPL2(UINT32, JIT_UMod, UINT32 dividend, UINT32 divisor)
FCALL_CONTRACT;

if (divisor == 0)
FCThrow(kDivideByZeroException);
COMPlusThrow(kDivideByZeroException);

return(dividend % divisor);
}
Expand Down Expand Up @@ -249,7 +249,7 @@ HCIMPL2_VV(INT64, JIT_LDiv, INT64 dividend, INT64 divisor)
return(dividend / divisor);

ThrowExcep:
FCThrow(ehKind);
COMPlusThrow(ehKind);
}
HCIMPLEND

Expand Down Expand Up @@ -289,7 +289,7 @@ HCIMPL2_VV(INT64, JIT_LMod, INT64 dividend, INT64 divisor)
return(dividend % divisor);

ThrowExcep:
FCThrow(ehKind);
COMPlusThrow(ehKind);
}
HCIMPLEND

Expand All @@ -301,7 +301,7 @@ HCIMPL2_VV(UINT64, JIT_ULDiv, UINT64 dividend, UINT64 divisor)
if (Hi32Bits(divisor) == 0)
{
if ((UINT32)(divisor) == 0)
FCThrow(kDivideByZeroException);
COMPlusThrow(kDivideByZeroException);

if (Hi32Bits(dividend) == 0)
return((UINT32)dividend / (UINT32)divisor);
Expand All @@ -319,7 +319,7 @@ HCIMPL2_VV(UINT64, JIT_ULMod, UINT64 dividend, UINT64 divisor)
if (Hi32Bits(divisor) == 0)
{
if ((UINT32)(divisor) == 0)
FCThrow(kDivideByZeroException);
COMPlusThrow(kDivideByZeroException);

if (Hi32Bits(dividend) == 0)
return((UINT32)dividend % (UINT32)divisor);
Expand Down Expand Up @@ -4253,7 +4253,7 @@ bool IndirectionAllowedForJitHelper(CorInfoHelpFunc ftnNum)
{
return false;
}

return true;
}

Expand Down
Loading