summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
Diffstat (limited to 'rts')
-rw-r--r--rts/Exception.cmm19
-rw-r--r--rts/PrimOps.cmm19
2 files changed, 19 insertions, 19 deletions
diff --git a/rts/Exception.cmm b/rts/Exception.cmm
index 587708e47e..3216edbcc4 100644
--- a/rts/Exception.cmm
+++ b/rts/Exception.cmm
@@ -14,6 +14,9 @@
#include "RaiseAsync.h"
import CLOSURE ghczmprim_GHCziTypes_True_closure;
+import CLOSURE base_GHCziExceptionziType_divZZeroException_closure;
+import CLOSURE base_GHCziExceptionziType_underflowException_closure;
+import CLOSURE base_GHCziExceptionziType_overflowException_closure;
/* -----------------------------------------------------------------------------
Exception Primitives
@@ -633,6 +636,22 @@ stg_raiseIOzh (P_ exception)
jump stg_raisezh (exception);
}
+
+stg_raiseDivZZerozh ()
+{
+ jump stg_raisezh(base_GHCziExceptionziType_divZZeroException_closure);
+}
+
+stg_raiseUnderflowzh ()
+{
+ jump stg_raisezh(base_GHCziExceptionziType_underflowException_closure);
+}
+
+stg_raiseOverflowzh ()
+{
+ jump stg_raisezh(base_GHCziExceptionziType_overflowException_closure);
+}
+
/* The FFI doesn't support variadic C functions so we can't directly expose
* `barf` to Haskell code. Instead we define "stg_panic#" and it is exposed to
* Haskell programs in GHC.Prim.Panic.
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 1bd30b3af0..1fd746edf6 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -31,9 +31,6 @@ import pthread_mutex_unlock;
#endif
import CLOSURE base_ControlziExceptionziBase_nestedAtomically_closure;
import CLOSURE base_GHCziIOziException_heapOverflow_closure;
-import CLOSURE base_GHCziExceptionziType_divZZeroException_closure;
-import CLOSURE base_GHCziExceptionziType_underflowException_closure;
-import CLOSURE base_GHCziExceptionziType_overflowException_closure;
import EnterCriticalSection;
import LeaveCriticalSection;
import CLOSURE ghczmprim_GHCziTypes_False_closure;
@@ -2601,19 +2598,3 @@ stg_setThreadAllocationCounterzh ( I64 counter )
StgTSO_alloc_limit(CurrentTSO) = counter + TO_I64(offset);
return ();
}
-
-
-stg_raiseDivZZerozh ()
-{
- jump stg_raisezh(base_GHCziExceptionziType_divZZeroException_closure);
-}
-
-stg_raiseUnderflowzh ()
-{
- jump stg_raisezh(base_GHCziExceptionziType_underflowException_closure);
-}
-
-stg_raiseOverflowzh ()
-{
- jump stg_raisezh(base_GHCziExceptionziType_overflowException_closure);
-}