[Git][ghc/ghc][ghc-9.12] 11 commits: AArch64: use ASR not LSR for MO_U_Shr at W8/W16
Magnus pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC Commits: 82c521c6 by Ian Duncan at 2026-05-25T13:39:24+02:00 AArch64: use ASR not LSR for MO_U_Shr at W8/W16 The unsigned right shift (MO_U_Shr) for sub-word widths (W8, W16) with a variable shift amount was emitting ASR (arithmetic/signed shift right) after zero-extending with UXTB/UXTH. This should be LSR (logical/unsigned shift right). After zero-extension the upper bits happen to be 0 so ASR produces the same result, but it is semantically wrong and would break if the zero-extension were ever optimized away. Includes assembly output test (grep for lsr) and runtime test verifying unsigned right shift of Word8 and Word16 values. (cherry picked from commit 50188615342098345fc2822ea223ab23791bbf49) - - - - - 11ce0b56 by doyougnu at 2026-05-25T14:42:22+02:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. (cherry picked from commit 25121dbc57724498776c0d46f810612f4ca81cc4) - - - - - 79a11a9d by Zubin Duggal at 2026-05-27T10:39:32+02:00 Update to semaphore-compat 2.0.0 using v2 of the protocol On Linux and other POSIX platforms, GHC's -jsem jobserver client now speaks v2 of the semaphore-compat protocol, which uses Unix domain sockets in place of POSIX named semaphores. This avoids the libc-ABI issues that affected the old implementation. Windows is unaffected and continues to use the v1 protocol (Win32 named semaphores); its reported protocol version remains v1. When GHC receives a -jsem name whose protocol version it does not support, it emits a -Wsemaphore-version-mismatch warning and falls back to -j<N> rather than crashing. ghc --info exposes the supported version in a new "Semaphore version" entry so cabal-install can detect a mismatch before invoking GHC. Users on a cabal-install that predates the v2 update will continue to build successfully on Linux/POSIX, but will lose the cross-process -jsem coordination and fall back to -j<N> per GHC invocation. Users must upgrade to a cabal-install that supports protocol v2 to recover full parallelism. Also fix a leak in cleanupSem (#27253): cleanupSem used to snapshot heldTokens and release them before killing the loop, while the loop's in-flight acquire/release children could still be mutating it. Cleanup now runs inside the loop's own exit handler, after draining the active child via a new activeChild TVar, so the snapshot has no concurrent mutator. See also: - GHC proposal amendment: https://github.com/ghc-proposals/ghc-proposals/pull/673 - cabal-install patch: https://github.com/haskell/cabal/pull/11628 - semaphore-compat MR: https://gitlab.haskell.org/ghc/semaphore-compat/-/merge_requests/8 Bump semaphore-compat submodule to 2.0.0 Fixes #25087 and #27253 (cherry picked from commit 8db331a381ae47ad9ad5c8613f5d3e2588d5dd55) - - - - - 9c23da6a by mangoiv at 2026-05-27T10:39:32+02:00 libraries/process: bump submodule to v1.6.29.0 This submodule bump resolves a segfault on macos 15. Fixes #27144 (cherry picked from commit 277a3687c4b729e4d1ff4d4503a5673deba5eda7) - - - - - 669ac491 by mangoiv at 2026-05-27T14:17:46+02:00 Update autoconf scripts Scripts taken from autoconf 428664896cf9e92d264976a960c76660938dffce - - - - - 6b497eee by mangoiv at 2026-05-27T21:25:30+02:00 packaging: regenerate llvm-targets regenerate llvm-targets using utils/llvm-targets/gen-data-layout.sh and clang version 19.1.7 Target: x86_64-unknown-linux-gnu - - - - - e246c44d by Cheng Shao at 2026-05-27T21:25:30+02:00 ghc-internal: update to unicode 17.0.0 This commit updates the generated code in ghc-internal to match unicode 17.0.0. (cherry picked from commit 7077c9f76ebadedefd763078e7f7c42201b8a4b4) - - - - - 007b39e6 by Cheng Shao at 2026-05-27T21:25:30+02:00 wasm: ensure post-linker output is synchronous ESM This patch fixes wasm backend's post-linker output script to ensure it's synchronous ESM and doesn't use top-level await, which doesn't work in ServiceWorkers. Fixes #27257. (cherry picked from commit cccf45da01988801b0c97f7e7ed0160191980226) - - - - - dddf7bea by Luite Stegeman at 2026-05-28T22:50:24+02:00 Fixes for black holes - suspend duplicate work for eager black holes - detect eager black holes in checkBlockingQueues - don't overwrite existing black holes even if they're not in an eager blackhole frame - don't deadlock on self when thunk is already blackholed Fixes #26936 (cherry picked from commit 63ce5770da1712f0da54665d8755772bf38ba51e) - - - - - 4433f73d by Tom McLaughlin at 2026-05-28T22:51:40+02:00 Event/Windows.hsc: rethrow exceptions in overlapped IO This prevents the WinIO manager from swallowing exceptions in overlapped IO. It was added to make WinIO support possible in the `network` library. See https://gitlab.haskell.org/ghc/ghc/-/issues/27283. We also bump __IO_MANAGER_WINIO__ to 2 so libraries can gate on this using CPP. (cherry picked from commit 037a80dc65d3975adf4a35d46876850e644bc80e) - - - - - 53f74985 by mangoiv at 2026-06-01T11:44:10+02:00 Trim the continuation in mkDupableContWithDmds When there are no remaining argument demands, it means the application is bottoming. In this case, we can trim the continuation to avoid the panic that was observed in #27261. See Note [Trimming the continuation for bottoming functions] in GHC.Core.Opt.Simplify.Iteration. This patch was rewritten to avoid pulling in a refactor. The original patch is included in master as 4a645683 - - - - - 79 changed files: - + changelog.d/T26979 - + changelog.d/bump-process - + changelog.d/fix-blackhole-handling - + changelog.d/jobserver-leak-fix - + changelog.d/semaphore-v2 - + changelog.d/wasm-fix-serviceworker - + changelog.d/windows-rethrow-overlapped-exception - compiler/GHC/CmmToAsm/AArch64/CodeGen.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Errors/Types.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeSem.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/SysTools/Cpp.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/Hint.hs - compiler/GHC/Types/Hint/Ppr.hs - config.guess - config.sub - docs/users_guide/runtime_control.rst - docs/users_guide/using-warnings.rst - docs/users_guide/using.rst - hadrian/src/Flavour.hs - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc - libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/GeneralCategory.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleLowerCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleTitleCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleUpperCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs - libraries/ghc-internal/tools/ucd2haskell/ucd.sh - libraries/ghc-internal/tools/ucd2haskell/unicode_version - libraries/process - libraries/semaphore-compat - llvm-targets - rts/Linker.c - rts/Messages.c - rts/RtsFlags.c - rts/ThreadPaused.c - rts/Threads.c - rts/Updates.h - rts/include/rts/Flags.h - rts/include/rts/storage/ClosureMacros.h - rts/linker/elf_got.c - + testsuite/tests/codeGen/should_gen_asm/aarch64-shl-subword.asm - + testsuite/tests/codeGen/should_gen_asm/aarch64-shl-subword.hs - + testsuite/tests/codeGen/should_gen_asm/aarch64-ushr-subword.asm - + testsuite/tests/codeGen/should_gen_asm/aarch64-ushr-subword.hs - testsuite/tests/codeGen/should_gen_asm/all.T - + testsuite/tests/codeGen/should_run/aarch64-subword-ops.hs - + testsuite/tests/codeGen/should_run/aarch64-subword-ops.stdout - + testsuite/tests/codeGen/should_run/aarch64-ushr-subword-run.hs - + testsuite/tests/codeGen/should_run/aarch64-ushr-subword-run.stdout - testsuite/tests/codeGen/should_run/all.T - testsuite/tests/diagnostic-codes/codes.stdout - + testsuite/tests/ghci/linking/T25240/Makefile - + testsuite/tests/ghci/linking/T25240/T25240.hs - + testsuite/tests/ghci/linking/T25240/T25240.stderr - + testsuite/tests/ghci/linking/T25240/T25240a.hs - + testsuite/tests/ghci/linking/T25240/all.T - testsuite/tests/ghci/should_run/T18064.stderr - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/rts/linker/T11223/T11223_link_order_a_b_2_fail.stderr - testsuite/tests/rts/linker/T11223/T11223_link_order_a_b_2_fail.stderr-ws-64-mingw32 - testsuite/tests/rts/linker/T11223/T11223_simple_duplicate_lib.stderr - testsuite/tests/rts/linker/T11223/T11223_simple_duplicate_lib.stderr-ws-64-mingw32 - + testsuite/tests/simplCore/should_compile/T27261.hs - + testsuite/tests/simplCore/should_compile/T27261_aux.hs - testsuite/tests/simplCore/should_compile/all.T - utils/jsffi/prelude.mjs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c18b40a6823b950c0fba57df6195ac7... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c18b40a6823b950c0fba57df6195ac7... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Magnus (@MangoIV)