[Git][ghc/ghc][wip/decode_cloned_stack] Enable 32bit testing of stack_misc_closures
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Sat Feb 11 14:32:12 UTC 2023
Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC
Commits:
32e581a8 by Sven Tennie at 2023-02-11T14:30:54+00:00
Enable 32bit testing of stack_misc_closures
- - - - -
2 changed files:
- libraries/ghc-heap/tests/stack_misc_closures.hs
- libraries/ghc-heap/tests/stack_misc_closures_c.c
Changes:
=====================================
libraries/ghc-heap/tests/stack_misc_closures.hs
=====================================
@@ -63,6 +63,8 @@ foreign import prim "any_underflow_framezh" any_underflow_frame# :: SetupFunctio
foreign import ccall "maxSmallBitmapBits" maxSmallBitmapBits_c :: Word
+foreign import ccall "bitsInWord" bitsInWord :: Word
+
foreign import ccall "belchStack" belchStack# :: StackSnapshot# -> IO ()
{- Test stategy
@@ -226,13 +228,13 @@ main = do
RetBig {..} -> do
assertEqual (tipe info) RET_BIG
pCs <- mapM getBoxedClosureData payload
- let closureCount = 64 + 1
+ let closureCount = fromIntegral $ bitsInWord + 1
assertEqual (length pCs) closureCount
let wds = map getWordFromConstr01 pCs
assertEqual wds [1 .. (fromIntegral closureCount)]
e -> error $ "Wrong closure type: " ++ show e
traceM $ "Test 24"
- testSize any_ret_big_closures_two_words_frame# (64 + 1 + 1)
+ testSize any_ret_big_closures_two_words_frame# ((fromIntegral bitsInWord) + 1 + 1)
traceM $ "Test 25"
test any_ret_fun_arg_n_prim_framezh# $
\case
=====================================
libraries/ghc-heap/tests/stack_misc_closures_c.c
=====================================
@@ -94,6 +94,8 @@ void create_any_ret_small_closure_frame(Capability *cap, StgStack *stack,
StgWord maxSmallBitmapBits() { return MAX_SMALL_BITMAP_BITS; }
+StgWord bitsInWord() { return BITS_IN(W_); }
+
RTS_RET(test_small_ret_full_p);
void create_any_ret_small_closures_frame(Capability *cap, StgStack *stack,
StgWord w) {
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32e581a85cf92cde93ad1ca424f8f61eafbd3a96
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32e581a85cf92cde93ad1ca424f8f61eafbd3a96
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230211/be087420/attachment-0001.html>
More information about the ghc-commits
mailing list