Use native x86_64 instructions on x32
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Fri, 31 Jul 2020 15:48:26 +0000 (16:48 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Fri, 31 Jul 2020 15:48:26 +0000 (16:48 +0100)
commit0073577121fff522082fca1e50f356b90ab8d6e8
tree1d1f691c570c625a8a54944af4236bde64b1368d
parent77c4ff01fd963b024ccb8e73f8b2404bbd3d0387
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