Browse Source
* cranelift: Implement `vall_true` for floats in the interpreter * cranelift: Implement `vany_true` for floats in the interpreter * cranelift: Implement `vhigh_bits` for floats in the interpreter * cranelift: Forbid vector return types for `vhigh_bits` This instruction doesen't really make sense with a vector return type. The description also states that it returns a scalar integer so I suspect it wasn't intended to allow vector integers. * fuzzgen: Enable `v{all,any}_true` and `vhigh_bits`pull/6999/head
Afonso Bordado
1 year ago
committed by
GitHub
6 changed files with 81 additions and 60 deletions
@ -0,0 +1,26 @@ |
|||
test interpret |
|||
test run |
|||
target s390x |
|||
target x86_64 has_sse3 has_ssse3 has_sse41 |
|||
target x86_64 has_sse3 has_ssse3 has_sse41 has_avx |
|||
target riscv64gc has_v |
|||
|
|||
function %vhighbits_f32x4(f32x4) -> i8 { |
|||
block0(v0: f32x4): |
|||
v1 = vhigh_bits.i8 v0 |
|||
return v1 |
|||
} |
|||
; run: %vhighbits_f32x4([0.0 0.0 0.0 0.0]) == 0 |
|||
; run: %vhighbits_f32x4([0.0 -0.0 0.0 0.0]) == 2 |
|||
; run: %vhighbits_f32x4([-0.0 -0.0 -0.0 -0.0]) == 0xF |
|||
; run: %vhighbits_f32x4([0x1.0 0x1.0 0x1.0 0x1.0]) == 0 |
|||
|
|||
function %vhighbits_f64x2(f64x2) -> i8 { |
|||
block0(v0: f64x2): |
|||
v1 = vhigh_bits.i8 v0 |
|||
return v1 |
|||
} |
|||
; run: %vhighbits_f64x2([0.0 0.0]) == 0 |
|||
; run: %vhighbits_f64x2([0.0 -0.0]) == 2 |
|||
; run: %vhighbits_f64x2([-0.0 -0.0]) == 3 |
|||
; run: %vhighbits_f64x2([0x1.0 0x1.0]) == 0 |
Loading…
Reference in new issue