[Git][ghc/ghc][master] 2 commits: rts: Fix size of StgOrigThunkInfo frames
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed May 22 17:41:17 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00
rts: Fix size of StgOrigThunkInfo frames
Previously the entry code of the `stg_orig_thunk` frame failed to
account for the size of the profiling header as it hard-coded the frame
size. Fix this.
Fixes #24809.
- - - - -
c645fe40 by Fendor at 2024-05-22T13:40:05-04:00
Add regression test T24809 for stg_orig_thunk_info_frame size
- - - - -
4 changed files:
- rts/StgMiscClosures.cmm
- + testsuite/tests/codeGen/should_run/T24809.hs
- + testsuite/tests/codeGen/should_run/T24809.stdout
- testsuite/tests/codeGen/should_run/all.T
Changes:
=====================================
rts/StgMiscClosures.cmm
=====================================
@@ -51,8 +51,8 @@ INFO_TABLE_RET (stg_orig_thunk_info_frame, RET_SMALL,
W_ thunk_info_ptr)
/* no args => explicit stack */
{
- unwind Sp = W_[Sp + WDS(2)];
- Sp_adj(2);
+ unwind Sp = W_[Sp + SIZEOF_StgOrigThunkInfoFrame];
+ Sp = Sp + SIZEOF_StgOrigThunkInfoFrame;
jump %ENTRY_CODE(Sp(0)) [*]; // NB. all registers live!
}
=====================================
testsuite/tests/codeGen/should_run/T24809.hs
=====================================
@@ -0,0 +1,2 @@
+
+main = putStrLn "hi"
=====================================
testsuite/tests/codeGen/should_run/T24809.stdout
=====================================
@@ -0,0 +1 @@
+hi
=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -226,6 +226,7 @@ test('T22296',[only_ways(llvm_ways)
test('T22798', normal, compile_and_run, ['-fregs-graph'])
test('CheckBoundsOK', normal, compile_and_run, ['-fcheck-prim-bounds'])
test('OrigThunkInfo', normal, compile_and_run, ['-forig-thunk-info'])
+test('T24809', req_profiling, compile_and_run, ['-forig-thunk-info -prof'])
# TODO: Enable more architectures here. N.B. some code generation backends are
# not implemeted correctly (according to
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b880ee801533ecde3f06aa42e2e888ab0d23c2db...c645fe406cd4a3f4c152e51dfbcdeeb5e2930fb1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b880ee801533ecde3f06aa42e2e888ab0d23c2db...c645fe406cd4a3f4c152e51dfbcdeeb5e2930fb1
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/20240522/5facc7dc/attachment-0001.html>
More information about the ghc-commits
mailing list