Files
wasmtime/cranelift/filetests/filetests/isa/x64/select.clif
Trevor Elliott cc073593a4 Fix block label printing in precise-output tests (#5798)
As a follow-up to #5780, disassemble the regions identified by bb_starts, falling back on disassembling the whole buffer. This ensures that instructions like br_table that introduce a lot of constants don't throw off capstone for the remainder of the function.

---------

Co-authored-by: Jamey Sharp <jamey@minilop.net>
2023-02-16 02:35:26 +00:00

68 lines
1.2 KiB
Plaintext

test compile precise-output
target x86_64
function %f0(i32, i32, i64, i64) -> i64 {
block0(v0: i32, v1: i32, v2: i64, v3: i64):
v4 = icmp eq v0, v1
v5 = uextend.i32 v4
v6 = select.i64 v5, v2, v3
return v6
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; cmpl %esi, %edi
; movq %rcx, %rax
; cmovzq %rdx, %rax, %rax
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; cmpl %esi, %edi
; movq %rcx, %rax
; cmoveq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; retq
function %f0(f32, f32, i64, i64) -> i64 {
block0(v0: f32, v1: f32, v2: i64, v3: i64):
v4 = fcmp eq v0, v1
v5 = uextend.i32 v4
v6 = select.i64 v5, v2, v3
return v6
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; ucomiss %xmm0, %xmm1
; movq %rdi, %rax
; cmovnzq %rsi, %rax, %rax
; cmovpq %rsi, %rax, %rax
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; ucomiss %xmm0, %xmm1
; movq %rdi, %rax
; cmovneq %rsi, %rax
; cmovpq %rsi, %rax
; movq %rbp, %rsp
; popq %rbp
; retq