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

120 lines
2.0 KiB
Plaintext

test compile precise-output
target x86_64
function %f1(f32) -> f32 {
block0(v0: f32):
v1 = fabs v0
return v1
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movl $2147483647, %eax
; movd %eax, %xmm4
; andps %xmm0, %xmm4, %xmm0
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movl $0x7fffffff, %eax
; movd %eax, %xmm4
; andps %xmm4, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
function %f2(f64) -> f64 {
block0(v0: f64):
v1 = fabs v0
return v1
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movabsq $9223372036854775807, %rax
; movq %rax, %xmm4
; andpd %xmm0, %xmm4, %xmm0
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movabsq $0x7fffffffffffffff, %rax
; movq %rax, %xmm4
; andpd %xmm4, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
function %f3(f32x4) -> f32x4 {
block0(v0: f32x4):
v1 = fabs v0
return v1
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; pcmpeqd %xmm3, %xmm3, %xmm3
; psrld %xmm3, $1, %xmm3
; andps %xmm0, %xmm3, %xmm0
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; pcmpeqd %xmm3, %xmm3
; psrld $1, %xmm3
; andps %xmm3, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
function %f4(f64x2) -> f64x2 {
block0(v0: f64x2):
v1 = fabs v0
return v1
}
; VCode:
; pushq %rbp
; movq %rsp, %rbp
; block0:
; pcmpeqd %xmm3, %xmm3, %xmm3
; psrlq %xmm3, $1, %xmm3
; andpd %xmm0, %xmm3, %xmm0
; movq %rbp, %rsp
; popq %rbp
; ret
;
; Disassembled:
; block0: ; offset 0x0
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; pcmpeqd %xmm3, %xmm3
; psrlq $1, %xmm3
; andpd %xmm3, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq