Codegen fix atomic_cas with samll types on riscv64 (#5919)

* fix issue5901

* add regression test file.

* fix regression targets.

* fix a comment.

* enable atomic-cas-little for riscv64

* specify little endian some s390x can pass test.

* fix register error
This commit is contained in:
yuyang
2023-03-07 21:32:28 +08:00
committed by GitHub
parent d3fdb5fc2c
commit 812b4b5229
4 changed files with 28 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
test interpret
test run
target s390x
target riscv64 has_a
; We can't test that these instructions are right regarding atomicity, but we can
; test if they perform their operation correctly

View File

@@ -0,0 +1,21 @@
test interpret
test run
target aarch64
target s390x
target x86_64
target riscv64
function %a(i8) -> i8 sext system_v {
ss2 = explicit_slot 2
block0(v0: i8):
v2 = iconst.i16 0x00ff
v3 = stack_addr.i64 ss2
store little v2, v3
v4 = stack_addr.i64 ss2+1
v5 = atomic_cas little v4, v0, v0
return v5
}
; run: %a(0) == 0