From 87ee333b156e3908a36176ec8fbfee5896c3a1ae Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 26 May 2020 15:21:24 -0700 Subject: [PATCH] Translate Wasm's f32x4.convert_i32x4_u instruction to Cranelift's fcvt_from_uint --- cranelift/wasm/src/code_translator.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index df6eda17601a..20c6e3af8d5d 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1544,9 +1544,12 @@ pub fn translate_operator( let a = pop1_with_bitcast(state, I32X4, builder); state.push1(builder.ins().fcvt_from_sint(F32X4, a)) } + Operator::F32x4ConvertI32x4U => { + let a = pop1_with_bitcast(state, I32X4, builder); + state.push1(builder.ins().fcvt_from_uint(F32X4, a)) + } Operator::I32x4TruncSatF32x4S | Operator::I32x4TruncSatF32x4U - | Operator::F32x4ConvertI32x4U | Operator::I8x16Abs | Operator::I16x8Abs | Operator::I32x4Abs