unrecognized opcode "clrrhi" when compiling bytestring-lexing on ppc64el and ppc64
Summary
Compiling bytestring-lexing on ppc64el (or ppc64) using GHC 9.4.7 from Debian, fails with the following error:
/tmp/ghc3753610_0/ghc_1.s:8917:0: error:
Error: unrecognized opcode: `clrrbi'
|
8917 | clrrbi 31, 31, 3
| ^
/tmp/ghc3753610_0/ghc_1.s:14742:0: error:
Error: unrecognized opcode: `clrrhi'
|
14742 | clrrhi 31, 31, 3
| ^
<no location info>: error:
`powerpc64le-linux-gnu-gcc' failed in phase `Assembler'. (Exit code: 1)
Debian bug: https://bugs.debian.org/1054894
I also tried with the LLVM backend which succeeded without any error.
Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
$ cabal get bytestring-lexing-0.5.0.10
$ cd bytestring-lexing-0.5.0.10
$ cabal build
...
[2 of 3] Compiling Data.ByteString.Lex.Integral ( src/Data/ByteString/Lex/Integral.hs, /home/iliastsi/bytestring-lexing-0.5.0.10/dist-newstyle/build/ppc64-linux/ghc-9.4.7/bytestring-lexing-0.5.0.10/build/Data/ByteString/Lex/Integral.o, /home/iliastsi/bytestring-lexing-0.5.0.10/dist-newstyle/build/ppc64-linux/ghc-9.4.7/bytestring-lexing-0.5.0.10/build/Data/ByteString/Lex/Integral.dyn_o )
/tmp/ghc3753008_0/ghc_5.s: Assembler messages:
/tmp/ghc3753008_0/ghc_5.s:8917:0: error:
Error: unrecognized opcode: `clrrbi'
|
8917 | clrrbi 31, 31, 3
| ^
/tmp/ghc3753008_0/ghc_5.s:14742:0: error:
Error: unrecognized opcode: `clrrhi'
|
14742 | clrrhi 31, 31, 3
| ^
<no location info>: error:
`powerpc64le-linux-gnu-gcc' failed in phase `Assembler'. (Exit code: 1)