mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Fix the signum of numeric operations in the text format.
This commit is contained in:
parent
5f0c24f5af
commit
a07e7fe4b1
@ -187,7 +187,17 @@ public class TextModuleWriter extends ModuleWriter {
|
|||||||
@Override
|
@Override
|
||||||
protected void writeNumericOperator( NumericOperator numOp, @Nullable ValueType valueType ) throws IOException {
|
protected void writeNumericOperator( NumericOperator numOp, @Nullable ValueType valueType ) throws IOException {
|
||||||
newline( methodOutput );
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user