add support for i32.mul to wat parser

This commit is contained in:
Volker Berlin 2019-11-18 17:36:26 +01:00
parent 35005e2a1a
commit ed00c7a02f
2 changed files with 8 additions and 0 deletions

View File

@ -76,6 +76,9 @@ public class WatParser extends WasmCodeBuilder {
case "i32.add":
addNumericInstruction( NumericOperator.add, ValueType.i32, javaCodePos, lineNumber );
break;
case "i32.mul":
addNumericInstruction( NumericOperator.mul, ValueType.i32, javaCodePos, lineNumber );
break;
case "i32.reinterpret_f32":
addConvertInstruction( ValueTypeConvertion.f2i_re, javaCodePos, lineNumber );
break;

View File

@ -130,6 +130,11 @@ public class WatParserTest {
test( "i32.const -7" );
}
@Test
public void i32_mul() throws IOException {
test( "i32.mul" );
}
@Test
public void i32_reinterpret_f32() throws IOException {
test( "i32.reinterpret_f32" );