Files
wasmtime/cranelift/filetests/filetests/isa/x64/umulhi.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

91 lines
1.4 KiB
Plaintext

test compile precise-output
target x86_64
function %f1(i16, i16) -> i16 {
block0(v0: i16, v1: i16):
v2 = umulhi v0, v1
return v2
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movq %rdi, %rax
; mul %ax, %si, %ax, %dx
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movq %rdi, %rax
; mulw %si
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; retq
function %f2(i32, i32) -> i32 {
block0(v0: i32, v1: i32):
v2 = umulhi v0, v1
return v2
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movq %rdi, %rax
; mul %eax, %esi, %eax, %edx
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movq %rdi, %rax
; mull %esi
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; retq
function %f3(i64, i64) -> i64 {
block0(v0: i64, v1: i64):
v2 = umulhi v0, v1
return v2
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movq %rdi, %rax
; mul %rax, %rsi, %rax, %rdx
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movq %rdi, %rax
; mulq %rsi
; movq %rdx, %rax
; movq %rbp, %rsp
; popq %rbp
; retq