mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
wasm: fix raw conversion of float and double to int and long
This commit is contained in:
parent
de25cee3b8
commit
e84a1a8531
|
@ -48,7 +48,7 @@ public class DoubleIntrinsic implements WasmIntrinsic {
|
||||||
case "isNaN":
|
case "isNaN":
|
||||||
case "isInfinite":
|
case "isInfinite":
|
||||||
case "isFinite":
|
case "isFinite":
|
||||||
case "doubleToLongBits":
|
case "doubleToRawLongBits":
|
||||||
case "longBitsToDouble":
|
case "longBitsToDouble":
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -74,7 +74,7 @@ public class DoubleIntrinsic implements WasmIntrinsic {
|
||||||
new WasmInt32Constant(0));
|
new WasmInt32Constant(0));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case "doubleToLongBits": {
|
case "doubleToRawLongBits": {
|
||||||
WasmConversion conversion = new WasmConversion(WasmType.FLOAT64, WasmType.INT64, false,
|
WasmConversion conversion = new WasmConversion(WasmType.FLOAT64, WasmType.INT64, false,
|
||||||
manager.generate(invocation.getArguments().get(0)));
|
manager.generate(invocation.getArguments().get(0)));
|
||||||
conversion.setReinterpret(true);
|
conversion.setReinterpret(true);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class FloatIntrinsic implements WasmIntrinsic {
|
||||||
case "isNaN":
|
case "isNaN":
|
||||||
case "isInfinite":
|
case "isInfinite":
|
||||||
case "isFinite":
|
case "isFinite":
|
||||||
case "floatToIntBits":
|
case "floatToRawIntBits":
|
||||||
case "intBitsToFloat":
|
case "intBitsToFloat":
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -73,7 +73,7 @@ public class FloatIntrinsic implements WasmIntrinsic {
|
||||||
new WasmInt32Constant(0));
|
new WasmInt32Constant(0));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
case "floatToIntBits": {
|
case "floatToRawIntBits": {
|
||||||
WasmConversion conversion = new WasmConversion(WasmType.FLOAT32, WasmType.INT32, false,
|
WasmConversion conversion = new WasmConversion(WasmType.FLOAT32, WasmType.INT32, false,
|
||||||
manager.generate(invocation.getArguments().get(0)));
|
manager.generate(invocation.getArguments().get(0)));
|
||||||
conversion.setReinterpret(true);
|
conversion.setReinterpret(true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user