cranelift: Add atomic_rmw to interpreter (#5817) (#5856)

As per the linked issue, atomic_rmw was implemented without specific regard for thread safety.
Additionally, the relevant filetest (atomic-rmw-little.clif) was enabled and altered to fix an
inccorrect call to test function `%atomic_rmw_and_i64` after setting up test function
`%atomic_rmw_and_i32`.
This commit is contained in:
Jan-Justin van Tonder
2023-02-23 11:24:56 +01:00
committed by GitHub
parent f6c6bc2155
commit 0521155896
2 changed files with 43 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
test interpret
test run
target s390x
target s390x has_mie2
@@ -116,11 +117,11 @@ block0(v0: i32, v1: i32):
return v4
}
; run: %atomic_rmw_and_i64(0, 0) == 0
; run: %atomic_rmw_and_i64(1, 0) == 0
; run: %atomic_rmw_and_i64(0, 1) == 0
; run: %atomic_rmw_and_i64(1, 1) == 1
; run: %atomic_rmw_and_i64(0xF1FFFEFE, 0xCEFFEFEF) == 0xC0FFEEEE
; run: %atomic_rmw_and_i32(0, 0) == 0
; run: %atomic_rmw_and_i32(1, 0) == 0
; run: %atomic_rmw_and_i32(0, 1) == 0
; run: %atomic_rmw_and_i32(1, 1) == 1
; run: %atomic_rmw_and_i32(0xF1FFFEFE, 0xCEFFEFEF) == 0xC0FFEEEE