FFI: Fix pass small ints in foreign call wrappers
The Haskell calling convention requires integer parameters smaller than wordsize to be promoted to wordsize (where the upper bits are don't care). To access such small integer parameter read a word from the parameter array and then cast that word to the small integer target type. Fixes #15933
parent
bd761185
No related branches found
No related tags found
Pipeline #20920 passed with warnings
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/HsToCore/Foreign/Decl.hs 26 additions, 5 deletionscompiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/StgToCmm/Foreign.hs 1 addition, 1 deletioncompiler/GHC/StgToCmm/Foreign.hs
- testsuite/tests/ffi/should_run/Makefile 6 additions, 0 deletionstestsuite/tests/ffi/should_run/Makefile
- testsuite/tests/ffi/should_run/T15933.h 2 additions, 0 deletionstestsuite/tests/ffi/should_run/T15933.h
- testsuite/tests/ffi/should_run/T15933.hs 17 additions, 0 deletionstestsuite/tests/ffi/should_run/T15933.hs
- testsuite/tests/ffi/should_run/T15933.stdout 1 addition, 0 deletionstestsuite/tests/ffi/should_run/T15933.stdout
- testsuite/tests/ffi/should_run/T15933_c.c 7 additions, 0 deletionstestsuite/tests/ffi/should_run/T15933_c.c
- testsuite/tests/ffi/should_run/all.T 2 additions, 0 deletionstestsuite/tests/ffi/should_run/all.T
Loading
-
mentioned in merge request !3505 (closed)
-
mentioned in merge request !4928 (closed)
-
mentioned in commit f43da5c8
-
mentioned in commit 792191e4
Please register or sign in to comment