Skip to content

Commit 926bdb2

Browse files
committed
Fix regression after sljit upgrade
It looks like now sJitTemp0 can get overwritten during the conversion, making the multiplication produce the wrong value. This caused a regression: results: SOME TESTS FAILURES (success: false) cases.TestCommon testStatus: FAILURE F line: 34, expected "ok" but it is "Failed regression test for #926. x: 9"
1 parent 818f260 commit 926bdb2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/hx/cppia/Cppia.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,13 +3696,16 @@ void genSetter(CppiaCompiler *compiler, const JitVal &ioValue, ExprType exprType
36963696
}
36973697
else
36983698
{
3699-
inExpr->genCode(compiler, sJitTempF0, etFloat);
37003699
if (exprType==etFloat)
3700+
{
3701+
inExpr->genCode(compiler, sJitTempF0, etFloat);
37013702
compiler->mult(ioValue, sJitTempF0, ioValue,true);
3703+
}
37023704
else
37033705
{
37043706
JitTemp fval(compiler, jtFloat);
37053707
compiler->convert(ioValue, exprType, fval, etFloat);
3708+
inExpr->genCode(compiler, sJitTempF0, etFloat);
37063709
compiler->mult(sJitTempF0, sJitTempF0, fval, true);
37073710
compiler->convert(sJitTempF0, etFloat, ioValue, exprType);
37083711
}
@@ -8249,4 +8252,3 @@ void TypeData::link(CppiaModule &inModule)
82498252
} // end namespace hx
82508253

82518254

8252-

0 commit comments

Comments
 (0)