* Has this block been added to throw an inlined exception
* Returns true if the block was added to throw one of:
* range-check exception
+ * argument exception (used by feature SIMD)
+ * argument range-check exception (used by feature SIMD)
* divide by zero exception (Not used on X86/X64)
* null reference exception (Not currently used)
* overflow exception
{
return add->acdKind == SCK_RNGCHK_FAIL ||
add->acdKind == SCK_DIV_BY_ZERO ||
- add->acdKind == SCK_OVERFLOW;
+ add->acdKind == SCK_OVERFLOW
+#ifndef RYUJIT_CTPBUILD
+ || add->acdKind == SCK_ARG_EXCPN
+ || add->acdKind == SCK_ARG_RNG_EXCPN
+#endif //!RYUJIT_CTPBUILD
+ ;
}
}
{
if (block == add->acdDstBlk)
{
+ // Compute assert cond separately as assert macro cannot have conditional compilation directives.
+ bool cond = (add->acdKind == SCK_RNGCHK_FAIL ||
+ add->acdKind == SCK_DIV_BY_ZERO ||
+ add->acdKind == SCK_OVERFLOW
+#ifndef RYUJIT_CTPBUILD
+ || add->acdKind == SCK_ARG_EXCPN
+ || add->acdKind == SCK_ARG_RNG_EXCPN
+#endif //!RYUJIT_CTPBUILD
+ );
+ assert(cond);
+
assert(add->acdKind == SCK_RNGCHK_FAIL ||
add->acdKind == SCK_DIV_BY_ZERO ||
add->acdKind == SCK_OVERFLOW);
switch (codeKind)
{
case SCK_RNGCHK_FAIL: return CORINFO_HELP_RNGCHKFAIL;
+#ifndef RYUJIT_CTPBUILD
+ case SCK_ARG_EXCPN: return CORINFO_HELP_THROW_ARGUMENTEXCEPTION;
+ case SCK_ARG_RNG_EXCPN: return CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION;
+#endif //!RYUJIT_CTPBUILD
case SCK_DIV_BY_ZERO: return CORINFO_HELP_THROWDIVZERO;
case SCK_ARITH_EXCPN: return CORINFO_HELP_OVERFLOW;
default: assert(!"Bad codeKind"); return 0;
case SCK_PAUSE_EXEC: msg = " for PAUSE_EXEC"; break;
case SCK_DIV_BY_ZERO: msg = " for DIV_BY_ZERO"; break;
case SCK_OVERFLOW: msg = " for OVERFLOW"; break;
+#ifndef RYUJIT_CTPBUILD
case SCK_ARG_EXCPN: msg = " for ARG_EXCPN"; break;
case SCK_ARG_RNG_EXCPN: msg = " for ARG_RNG_EXCPN"; break;
+#endif //!RYUJIT_CTPBUILD
default: msg = " for ??"; break;
}