diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-07-21 22:30:59 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-29 13:13:59 -0400 |
commit | 20173629aab24b4caad9b2aa533f870a92e96b23 (patch) | |
tree | 5d2bdc77353df6f236c4e2ef055136104225e6b0 /includes | |
parent | 4d5b4ed24ef8cecd7b74d1a3d54f443e1216b22d (diff) | |
download | haskell-20173629aab24b4caad9b2aa533f870a92e96b23.tar.gz |
UNREG: implement 64-bit mach ops for 32-bit targets
Noticed build failures like
```
ghc-stage1: panic! (the 'impossible' happened)
GHC version 9.3.20210721:
pprCallishMachOp_for_C: MO_x64_Ne not supported!
```
on `--tagget=hppa2.0-unknown-linux-gnu`.
The change does not fix all 32-bit unreg target problems,
but at least allows linking final ghc binaries.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'includes')
-rw-r--r-- | includes/stg/Prim.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/includes/stg/Prim.h b/includes/stg/Prim.h index 5f432b6f9b..20b3d45bee 100644 --- a/includes/stg/Prim.h +++ b/includes/stg/Prim.h @@ -68,7 +68,40 @@ StgWord16 hs_bitrev16(StgWord16 x); StgWord32 hs_bitrev32(StgWord32 x); StgWord64 hs_bitrev64(StgWord64 x); -/* TODO: longlong.c */ +/* libraries/ghc-prim/cbits/longlong.c */ +#if WORD_SIZE_IN_BITS < 64 +StgInt hs_eq64 (StgWord64 a, StgWord64 b); +StgInt hs_ne64 (StgWord64 a, StgWord64 b); +StgInt hs_gtWord64 (StgWord64 a, StgWord64 b); +StgInt hs_geWord64 (StgWord64 a, StgWord64 b); +StgInt hs_ltWord64 (StgWord64 a, StgWord64 b); +StgInt hs_leWord64 (StgWord64 a, StgWord64 b); +StgInt hs_gtInt64 (StgInt64 a, StgInt64 b); +StgInt hs_geInt64 (StgInt64 a, StgInt64 b); +StgInt hs_ltInt64 (StgInt64 a, StgInt64 b); +StgInt hs_leInt64 (StgInt64 a, StgInt64 b); +StgInt64 hs_neg64 (StgInt64 a); +StgWord64 hs_add64 (StgWord64 a, StgWord64 b); +StgWord64 hs_sub64 (StgWord64 a, StgWord64 b); +StgWord64 hs_mul64 (StgWord64 a, StgWord64 b); +StgWord64 hs_remWord64 (StgWord64 a, StgWord64 b); +StgWord64 hs_quotWord64 (StgWord64 a, StgWord64 b); +StgInt64 hs_remInt64 (StgInt64 a, StgInt64 b); +StgInt64 hs_quotInt64 (StgInt64 a, StgInt64 b); +StgWord64 hs_and64 (StgWord64 a, StgWord64 b); +StgWord64 hs_or64 (StgWord64 a, StgWord64 b); +StgWord64 hs_xor64 (StgWord64 a, StgWord64 b); +StgWord64 hs_not64 (StgWord64 a); +StgWord64 hs_uncheckedShiftL64 (StgWord64 a, StgInt b); +StgWord64 hs_uncheckedShiftRL64 (StgWord64 a, StgInt b); +StgInt64 hs_uncheckedIShiftRA64 (StgInt64 a, StgInt b); +StgInt64 hs_intToInt64 (StgInt i); +StgInt hs_int64ToInt (StgInt64 i); +StgWord64 hs_int64ToWord64 (StgInt64 i); +StgWord64 hs_wordToWord64 (StgWord w); +StgWord hs_word64ToWord (StgWord64 w); +StgInt64 hs_word64ToInt64 (StgWord64 w); +#endif /* libraries/ghc-prim/cbits/pdep.c */ StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask); |