wasm: fix raw conversion of float and double to int and long

This commit is contained in:
Alexey Andreev 2023-09-25 20:12:55 +02:00
parent de25cee3b8
commit e84a1a8531
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ public class DoubleIntrinsic implements WasmIntrinsic {
case "isNaN":
case "isInfinite":
case "isFinite":
case "doubleToLongBits":
case "doubleToRawLongBits":
case "longBitsToDouble":
return true;
default:
@ -74,7 +74,7 @@ public class DoubleIntrinsic implements WasmIntrinsic {
new WasmInt32Constant(0));
return result;
}
case "doubleToLongBits": {
case "doubleToRawLongBits": {
WasmConversion conversion = new WasmConversion(WasmType.FLOAT64, WasmType.INT64, false,
manager.generate(invocation.getArguments().get(0)));
conversion.setReinterpret(true);

View File

@ -47,7 +47,7 @@ public class FloatIntrinsic implements WasmIntrinsic {
case "isNaN":
case "isInfinite":
case "isFinite":
case "floatToIntBits":
case "floatToRawIntBits":
case "intBitsToFloat":
return true;
default:
@ -73,7 +73,7 @@ public class FloatIntrinsic implements WasmIntrinsic {
new WasmInt32Constant(0));
return result;
}
case "floatToIntBits": {
case "floatToRawIntBits": {
WasmConversion conversion = new WasmConversion(WasmType.FLOAT32, WasmType.INT32, false,
manager.generate(invocation.getArguments().get(0)));
conversion.setReinterpret(true);