Files
wasmtime/cranelift/filetests/filetests/isa/aarch64/narrow-arithmetic.clif
Trevor Elliott f04decc4a1 Use capstone to validate precise-output tests (#5780)
Use the capstone library to disassemble precise-output tests, in addition to pretty-printing their vcode.
2023-02-15 16:35:10 -08:00

87 lines
1.2 KiB
Plaintext

test compile precise-output
set unwind_info=false
target aarch64
function %add8(i8, i8) -> i8 {
block0(v0: i8, v1: i8):
v2 = iadd.i8 v0, v1
return v2
}
; VCode:
; block0:
; add w0, w0, w1
; ret
;
; Disassembled:
; block0: ; offset 0x0
; add w0, w0, w1
; ret
function %add16(i16, i16) -> i16 {
block0(v0: i16, v1: i16):
v2 = iadd.i16 v0, v1
return v2
}
; VCode:
; block0:
; add w0, w0, w1
; ret
;
; Disassembled:
; block0: ; offset 0x0
; add w0, w0, w1
; ret
function %add32(i32, i32) -> i32 {
block0(v0: i32, v1: i32):
v2 = iadd.i32 v0, v1
return v2
}
; VCode:
; block0:
; add w0, w0, w1
; ret
;
; Disassembled:
; block0: ; offset 0x0
; add w0, w0, w1
; ret
function %add32_8(i32, i8) -> i32 {
block0(v0: i32, v1: i8):
v2 = sextend.i32 v1
v3 = iadd.i32 v0, v2
return v3
}
; VCode:
; block0:
; add w0, w0, w1, SXTB
; ret
;
; Disassembled:
; block0: ; offset 0x0
; add w0, w0, w1, sxtb
; ret
function %add64_32(i64, i32) -> i64 {
block0(v0: i64, v1: i32):
v2 = sextend.i64 v1
v3 = iadd.i64 v0, v2
return v3
}
; VCode:
; block0:
; add x0, x0, x1, SXTW
; ret
;
; Disassembled:
; block0: ; offset 0x0
; add x0, x0, w1, sxtw
; ret