From d2d02565fbf2d550a9cccf4fd1c8a844e6a400ed Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 5 Mar 2018 20:23:50 +0700 Subject: [PATCH] I64Extend16S should operate on 16 bits, not 8. This showed up in clippy warnings as the code for this case was the same as for `I64Extend8S`. --- lib/wasm/src/code_translator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 086646fa29..765b1a4577 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -654,7 +654,7 @@ pub fn translate_operator( } Operator::I64Extend16S => { let val = state.pop1(); - state.push1(builder.ins().ireduce(I8, val)); + state.push1(builder.ins().ireduce(I16, val)); let val = state.pop1(); state.push1(builder.ins().sextend(I64, val)); }