--os:standalone works again
This commit is contained in:
parent
651103ff32
commit
52851b722d
16 changed files with 552 additions and 621 deletions
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
proc raiseOverflow {.compilerproc, noinline, noreturn.} =
|
||||
# a single proc to reduce code size to a minimum
|
||||
raise newException(EOverflow, "over- or underflow")
|
||||
sysFatal(EOverflow, "over- or underflow")
|
||||
|
||||
proc raiseDivByZero {.compilerproc, noinline, noreturn.} =
|
||||
raise newException(EDivByZero, "divison by zero")
|
||||
sysFatal(EDivByZero, "divison by zero")
|
||||
|
||||
proc addInt64(a, b: int64): int64 {.compilerProc, inline.} =
|
||||
result = a +% b
|
||||
|
|
@ -322,16 +322,16 @@ when not defined(mulInt):
|
|||
# written in other languages.
|
||||
|
||||
proc raiseFloatInvalidOp {.noinline, noreturn.} =
|
||||
raise newException(EFloatInvalidOp, "FPU operation caused a NaN result")
|
||||
sysFatal(EFloatInvalidOp, "FPU operation caused a NaN result")
|
||||
|
||||
proc nanCheck(x: float64) {.compilerProc, inline.} =
|
||||
if x != x: raiseFloatInvalidOp()
|
||||
|
||||
proc raiseFloatOverflow(x: float64) {.noinline, noreturn.} =
|
||||
if x > 0.0:
|
||||
raise newException(EFloatOverflow, "FPU operation caused an overflow")
|
||||
sysFatal(EFloatOverflow, "FPU operation caused an overflow")
|
||||
else:
|
||||
raise newException(EFloatUnderflow, "FPU operations caused an underflow")
|
||||
sysFatal(EFloatUnderflow, "FPU operations caused an underflow")
|
||||
|
||||
proc infCheck(x: float64) {.compilerProc, inline.} =
|
||||
if x != 0.0 and x*0.5 == x: raiseFloatOverflow(x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue