diff options
author | Cheng Shao <terrorjack@type.dance> | 2023-04-05 03:13:27 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-24 12:19:44 -0400 |
commit | 87095f6a283d95016f66f4a14a3da923c394877c (patch) | |
tree | 3399b7d8655be5cc5fa443d4f6f5317a7532a42d /testsuite | |
parent | 787c6e8c5b96c95ead6cc7c213d12c5983975084 (diff) | |
download | haskell-87095f6a283d95016f66f4a14a3da923c394877c.tar.gz |
rts: always build 64-bit atomic ops
This patch does a few things:
- Always build 64-bit atomic ops in rts/ghc-prim, even on 32-bit
platforms
- Remove legacy "64bit" cabal flag of rts package
- Fix hs_xchg64 function prototype for 32-bit platforms
- Fix AtomicFetch test for wasm32
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/cmm/should_run/AtomicFetch_cmm.cmm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/testsuite/tests/cmm/should_run/AtomicFetch_cmm.cmm b/testsuite/tests/cmm/should_run/AtomicFetch_cmm.cmm index f545b632e0..eded663f18 100644 --- a/testsuite/tests/cmm/should_run/AtomicFetch_cmm.cmm +++ b/testsuite/tests/cmm/should_run/AtomicFetch_cmm.cmm @@ -7,17 +7,17 @@ cmm_foo64 (P_ p) { // p points to a ByteArray header, q points to its first element P_ q; - q = p + SIZEOF_StgHeader + WDS(1); + q = p + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload; - bits64 x; + I64 x; - prim %store_seqcst64(q, 42); - (x) = prim %fetch_add64(q, 5); - (x) = prim %fetch_sub64(q, 10); - (x) = prim %fetch_and64(q, 120); - (x) = prim %fetch_or64(q, 2); - (x) = prim %fetch_xor64(q, 33); - (x) = prim %fetch_nand64(q, 127); + prim %store_seqcst64(q, 42 :: I64); + (x) = prim %fetch_add64(q, 5 :: I64); + (x) = prim %fetch_sub64(q, 10 :: I64); + (x) = prim %fetch_and64(q, 120 :: I64); + (x) = prim %fetch_or64(q, 2 :: I64); + (x) = prim %fetch_xor64(q, 33 :: I64); + (x) = prim %fetch_nand64(q, 127 :: I64); (x) = prim %load_seqcst64(q); return (x); } @@ -26,9 +26,9 @@ cmm_foo32 (P_ p) { // p points to a ByteArray header, q points to its first element P_ q; - q = p + SIZEOF_StgHeader + WDS(1); + q = p + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload; - bits32 x; + I32 x; prim %store_seqcst32(q, 42); (x) = prim %fetch_add32(q, 5); @@ -45,9 +45,9 @@ cmm_foo16 (P_ p) { // p points to a ByteArray header, q points to its first element P_ q; - q = p + SIZEOF_StgHeader + WDS(1); + q = p + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload; - bits16 x; + I16 x; prim %store_seqcst16(q, 42); (x) = prim %fetch_add16(q, 5); @@ -64,9 +64,9 @@ cmm_foo8 (P_ p) { // p points to a ByteArray header, q points to its first element P_ q; - q = p + SIZEOF_StgHeader + WDS(1); + q = p + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload; - bits8 x; + I8 x; prim %store_seqcst8(q, 42); (x) = prim %fetch_add8(q, 5); |