summaryrefslogtreecommitdiff
path: root/ghc/compiler/nativeGen/StixInteger.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>1998-04-07 07:52:18 +0000
committersimonpj <unknown>1998-04-07 07:52:18 +0000
commite47dd5d2e5e6dadec89fd0c36d53a14e686dcbfa (patch)
treea8ab3cbff7300ec67c8aca9271c9b55532e23a3f /ghc/compiler/nativeGen/StixInteger.lhs
parent36bc0530e62eae1de7c5fbb99ed292f5cc28cece (diff)
downloadhaskell-e47dd5d2e5e6dadec89fd0c36d53a14e686dcbfa.tar.gz
[project @ 1998-04-07 07:51:07 by simonpj]
Simons changes while away at Tic/WG2.8
Diffstat (limited to 'ghc/compiler/nativeGen/StixInteger.lhs')
-rw-r--r--ghc/compiler/nativeGen/StixInteger.lhs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ghc/compiler/nativeGen/StixInteger.lhs b/ghc/compiler/nativeGen/StixInteger.lhs
index 37911bc47a..23c6a07f51 100644
--- a/ghc/compiler/nativeGen/StixInteger.lhs
+++ b/ghc/compiler/nativeGen/StixInteger.lhs
@@ -389,6 +389,7 @@ mpData_mantissa = mpData mantissa
Support for the Gnu GMP multi-precision package.
\begin{code}
+-- size (in words) of __MP_INT
mpIntSize = 3 :: Int
mpAlloc, mpSize, mpData :: StixTree -> StixTree
@@ -406,6 +407,7 @@ mpSpace gmp res sizes
= foldr sum (StPrim IntAddOp [fixed, hdrs]) sizes
where
sum x y = StPrim IntAddOp [StPrim IntAbsOp [x], y]
+ -- what's the magical 17 for?
fixed = StInt (toInteger (17 * res + gmp * mpIntSize))
hdrs = StPrim IntMulOp [dataHS, StInt (toInteger res)]
\end{code}