x64: Migrate brff and I128 branching instructions to ISLE (#4599)

https://github.com/bytecodealliance/wasmtime/pull/4599
This commit is contained in:
Trevor Elliott
2022-08-04 08:58:50 -07:00
committed by GitHub
parent 12a9705fbc
commit 1fc11bbe51
12 changed files with 254 additions and 356 deletions

View File

@@ -0,0 +1,62 @@
test run
target aarch64
target s390x
target x86_64
function %fcmp_eq(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp eq v0, v1
return v2
}
; run: %fcmp_eq(0x1.0, 0x1.0) == true
; run: %fcmp_eq(0x1.0, 0x0.0) == false
function %fcmp_ne(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp ne v0, v1
return v2
}
; run: %fcmp_ne(0x1.0, 0x1.0) == false
; run: %fcmp_ne(0x1.0, 0x0.0) == true
function %fcmp_lt(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp lt v0, v1
return v2
}
; run: %fcmp_lt(0x1.0, 0x1.0) == false
; run: %fcmp_lt(0x1.0, 0x0.0) == false
; run: %fcmp_lt(0x1.0, 0x2.3) == true
function %fcmp_le(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp le v0, v1
return v2
}
; run: %fcmp_le(0x1.0, 0x1.0) == true
; run: %fcmp_le(0x1.0, 0x0.0) == false
; run: %fcmp_le(0x1.0, 0x2.3) == true
function %fcmp_gt(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp gt v0, v1
return v2
}
; run: %fcmp_gt(0x1.0, 0x1.0) == false
; run: %fcmp_gt(0x1.0, 0x0.0) == true
; run: %fcmp_gt(0x1.0, 0x2.3) == false
function %fcmp_ge(f64, f64) -> b1 {
block0(v0: f64, v1: f64):
v2 = fcmp ge v0, v1
return v2
}
; run: %fcmp_ge(0x1.0, 0x1.0) == true
; run: %fcmp_ge(0x1.0, 0x0.0) == true
; run: %fcmp_ge(0x1.0, 0x2.3) == false