X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FConstants.lhs;h=f0766dc7c4f88959546c1153280db3f58576b5df;hb=bc28a1484c81da67373aa3b724f236e059b944a2;hp=771b5132c830c615093da142380f6514e832ad86;hpb=495ef8bd9ef30bffe50ea399b91e3ba09646b59a;p=ghc-hetmet.git diff --git a/ghc/compiler/main/Constants.lhs b/ghc/compiler/main/Constants.lhs index 771b513..f0766dc 100644 --- a/ghc/compiler/main/Constants.lhs +++ b/ghc/compiler/main/Constants.lhs @@ -24,6 +24,7 @@ module Constants ( aRR_WORDS_HDR_SIZE, aRR_PTRS_HDR_SIZE, rESERVED_C_STACK_BYTES, + rESERVED_STACK_WORDS, sTD_ITBL_SIZE, pROF_ITBL_SIZE, @@ -57,6 +58,7 @@ module Constants ( oTHER_TAG, mAX_INTLIKE, mIN_INTLIKE, + mAX_CHARLIKE, mIN_CHARLIKE, spRelToInt, @@ -64,7 +66,10 @@ module Constants ( iNT64_SIZE, wORD64_SIZE, + wORD_SIZE, + bLOCK_SIZE, + bLOCK_SIZE_W, interfaceFileFormatVersion @@ -117,6 +122,10 @@ oTHER_TAG = (INFO_OTHER_TAG :: Integer) -- (-1) unevaluated, probably mIN_INTLIKE, mAX_INTLIKE :: Integer -- Only used to compare with (MachInt Integer) mIN_INTLIKE = MIN_INTLIKE mAX_INTLIKE = MAX_INTLIKE + +mIN_CHARLIKE, mAX_CHARLIKE :: Int -- Only used to compare with (MachChar Int) +mIN_CHARLIKE = MIN_CHARLIKE +mAX_CHARLIKE = MAX_CHARLIKE \end{code} A little function that abstracts the stack direction. Note that most @@ -223,8 +232,22 @@ area is has available. rESERVED_C_STACK_BYTES = (RESERVED_C_STACK_BYTES :: Int) \end{code} +The amount of (Haskell) stack to leave free for saving registers when +returning to the scheduler. + +\begin{code} +rESERVED_STACK_WORDS = (RESERVED_STACK_WORDS :: Int) +\end{code} + +Size of a word, in bytes + +\begin{code} +wORD_SIZE = (WORD_SIZE :: Int) +\end{code} + Size of a storage manager block (in bytes). \begin{code} bLOCK_SIZE = (BLOCK_SIZE :: Int) +bLOCK_SIZE_W = (bLOCK_SIZE `div` wORD_SIZE :: Int) \end{code}