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:
@@ -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
|
||||
|
||||
21
cranelift/filetests/filetests/runtests/issue5901.clif
Normal file
21
cranelift/filetests/filetests/runtests/issue5901.clif
Normal 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
|
||||
Reference in New Issue
Block a user