Use native x86_64 instructions on x32
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Fri, 15 Jul 2022 14:03:35 +0000 (15:03 +0100)
committerIlias Tsitsimpis <iliastsi@debian.org>
Fri, 15 Jul 2022 14:03:35 +0000 (15:03 +0100)
commitde5a48c66e61ace12253f173f3ec86212d5af55d
tree31f1b02187482fc307acb3c0e8f539472f3d78d9
parent5ed9460de5e8beef018f647150a9fa2329e3f089
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