Use the capstone library to disassemble precise-output tests, in addition to pretty-printing their vcode.
40 lines
543 B
Plaintext
40 lines
543 B
Plaintext
test compile precise-output
|
|
set unwind_info=false
|
|
target aarch64
|
|
|
|
function %f(i64) -> i64 {
|
|
block0(v0: i64):
|
|
v1 = iconst.i64 3
|
|
v2 = ishl.i64 v0, v1
|
|
v3 = iadd.i64 v0, v2
|
|
return v3
|
|
}
|
|
|
|
; VCode:
|
|
; block0:
|
|
; add x0, x0, x0, LSL 3
|
|
; ret
|
|
;
|
|
; Disassembled:
|
|
; block0: ; offset 0x0
|
|
; add x0, x0, x0, lsl #3
|
|
; ret
|
|
|
|
function %f(i32) -> i32 {
|
|
block0(v0: i32):
|
|
v1 = iconst.i32 53
|
|
v2 = ishl.i32 v0, v1
|
|
return v2
|
|
}
|
|
|
|
; VCode:
|
|
; block0:
|
|
; lsl w0, w0, #21
|
|
; ret
|
|
;
|
|
; Disassembled:
|
|
; block0: ; offset 0x0
|
|
; lsl w0, w0, #0x15
|
|
; ret
|
|
|