1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWasm: Make f32-add/sub actually perform addition/subtraction

Instead of applying a unary operator to the ToS.
This alone fixes 4% of the spec test issues.
This commit is contained in:
Ali Mohammad Pur 2021-05-30 00:45:53 +04:30 committed by Ali Mohammad Pur
parent 08b567e137
commit e0b17988bd

View file

@ -756,9 +756,9 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
case Instructions::f32_sqrt.value():
UNARY_NUMERIC_OPERATION(float, sqrtf);
case Instructions::f32_add.value():
UNARY_NUMERIC_OPERATION(float, +);
BINARY_NUMERIC_OPERATION(float, +, float);
case Instructions::f32_sub.value():
UNARY_NUMERIC_OPERATION(float, -);
BINARY_NUMERIC_OPERATION(float, -, float);
case Instructions::f32_mul.value():
BINARY_NUMERIC_OPERATION(float, *, float);
case Instructions::f32_div.value():