Use native x86_64 instructions on x32
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Sun, 15 Sep 2024 21:17:25 +0000 (00:17 +0300)
committerIlias Tsitsimpis <iliastsi@debian.org>
Sun, 15 Sep 2024 21:17:25 +0000 (00:17 +0300)
commit832c4adf49332da54edbd63989e6db9e3f465255
tree59882b4149e54e752de9605e96829239f92abfc3
parent33a999bd52187d2be0955a60df377f96f49cf57f
Use native x86_64 instructions on x32

This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571

Gbp-Pq: Name x32-use-native-x86_64-insn.patch
rts/RtsSymbols.c