mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
implements numeric max operation
This commit is contained in:
parent
b3df8e9562
commit
99f7786cf8
@ -617,6 +617,16 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case max:
|
||||||
|
switch( valueType ) {
|
||||||
|
case f32:
|
||||||
|
op = F32_MAX;
|
||||||
|
break;
|
||||||
|
case f64:
|
||||||
|
op = F64_MAX;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if( op == 0 ) {
|
if( op == 0 ) {
|
||||||
throw new Error( valueType + "." + numOp );
|
throw new Error( valueType + "." + numOp );
|
||||||
|
@ -37,4 +37,5 @@ public enum NumericOperator {
|
|||||||
lt,
|
lt,
|
||||||
le,
|
le,
|
||||||
ge,
|
ge,
|
||||||
|
max,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user