mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
implement max operation in text format
This commit is contained in:
parent
a189a8328f
commit
fe442e42e6
@ -73,6 +73,9 @@ public class WatParser extends WasmCodeBuilder {
|
||||
case "f32.max":
|
||||
addNumericInstruction( NumericOperator.max, ValueType.f32, javaCodePos );
|
||||
break;
|
||||
case "f64.max":
|
||||
addNumericInstruction( NumericOperator.max, ValueType.f64, javaCodePos );
|
||||
break;
|
||||
case "i64.extend_s/i32":
|
||||
addConvertInstruction( ValueTypeConvertion.i2l, javaCodePos );
|
||||
break;
|
||||
|
@ -101,6 +101,16 @@ public class WatParserTest {
|
||||
test( "i32.add" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void f32_max() throws IOException {
|
||||
test( "f32.max" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void f64_max() throws IOException {
|
||||
test( "f64.max" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void i32_const() throws IOException {
|
||||
test( " i32.const -7 " );
|
||||
|
Loading…
x
Reference in New Issue
Block a user