forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x64: Migrate fcvt_from_sint and fcvt_low_from_sint to ISLE (bytecodea…
- Loading branch information
Showing
6 changed files
with
223 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
test compile precise-output | ||
target x86_64 | ||
|
||
function %f1(i8) -> f32 { | ||
block0(v0: i8): | ||
v1 = fcvt_from_sint.f32 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; movsbl %dil, %ecx | ||
; cvtsi2ss %ecx, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f2(i16) -> f32 { | ||
block0(v0: i16): | ||
v1 = fcvt_from_sint.f32 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; movswl %di, %ecx | ||
; cvtsi2ss %ecx, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f3(i32) -> f32 { | ||
block0(v0: i32): | ||
v1 = fcvt_from_sint.f32 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; cvtsi2ss %edi, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f4(i64) -> f32 { | ||
block0(v0: i64): | ||
v1 = fcvt_from_sint.f32 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; cvtsi2ss %rdi, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f5(i8) -> f64 { | ||
block0(v0: i8): | ||
v1 = fcvt_from_sint.f64 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; movsbl %dil, %ecx | ||
; cvtsi2sd %ecx, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f6(i16) -> f64 { | ||
block0(v0: i16): | ||
v1 = fcvt_from_sint.f64 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; movswl %di, %ecx | ||
; cvtsi2sd %ecx, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f7(i32) -> f64 { | ||
block0(v0: i32): | ||
v1 = fcvt_from_sint.f64 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; cvtsi2sd %edi, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f8(i64) -> f64 { | ||
block0(v0: i64): | ||
v1 = fcvt_from_sint.f64 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; cvtsi2sd %rdi, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|
||
function %f9(i32x4) -> f64x2 { | ||
block0(v0: i32x4): | ||
v1 = fcvt_low_from_sint.f64x2 v0 | ||
return v1 | ||
} | ||
|
||
; pushq %rbp | ||
; movq %rsp, %rbp | ||
; block0: | ||
; cvtdq2pd %xmm0, %xmm0 | ||
; movq %rbp, %rsp | ||
; popq %rbp | ||
; ret | ||
|