Fix the signum of numeric operations in the text format.

This commit is contained in:
Volker 2018-08-14 18:24:50 +02:00
parent 5f0c24f5af
commit a07e7fe4b1

View File

@ -187,7 +187,17 @@ public class TextModuleWriter extends ModuleWriter {
@Override
protected void writeNumericOperator( NumericOperator numOp, @Nullable ValueType valueType ) throws IOException {
newline( methodOutput );
methodOutput.append( valueType ).append( '.' ).append( numOp );
String op = numOp.toString();
switch( valueType ) {
case i32:
case i64:
switch( numOp ) {
case div:
case rem:
op += "_s";
}
}
methodOutput.append( valueType ).append( '.' ).append( op );
}
/**