File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ public static long LMod(long i, long j)
164
164
{
165
165
if ( j == 0 )
166
166
return ThrowLngDivByZero ( ) ;
167
+ else if ( j == - 1 && i == long . MinValue )
168
+ return ThrowLngOvf ( ) ;
167
169
else
168
170
return RhpLMod ( i , j ) ;
169
171
}
@@ -189,7 +191,7 @@ public static long LDiv(long i, long j)
189
191
if ( j == 0 )
190
192
return ThrowLngDivByZero ( ) ;
191
193
else if ( j == - 1 && i == long . MinValue )
192
- return ThrowLngArithExc ( ) ;
194
+ return ThrowLngOvf ( ) ;
193
195
else
194
196
return RhpLDiv ( i , j ) ;
195
197
}
@@ -205,12 +207,6 @@ private static ulong ThrowULngDivByZero()
205
207
{
206
208
throw new DivideByZeroException ( ) ;
207
209
}
208
-
209
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
210
- private static long ThrowLngArithExc ( )
211
- {
212
- throw new ArithmeticException ( ) ;
213
- }
214
210
#endif // TARGET_64BIT
215
211
216
212
[ RuntimeExport ( "Dbl2IntOvf" ) ]
You can’t perform that action at this time.
0 commit comments