]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix soft-float math.abs() and negation.
authorMike Pall <mike>
Mon, 20 Feb 2017 01:51:05 +0000 (02:51 +0100)
committerMike Pall <mike>
Mon, 20 Feb 2017 01:51:05 +0000 (02:51 +0100)
Broken since SIMD constants were switched to IR_FLOAD REF_NIL.

src/lj_opt_split.c

index 09a85da7e8f9c8d4893b884144cb5808125ad45f..fc9352042ed3818cd195c5171a9b6741916c25dd 100644 (file)
@@ -436,7 +436,8 @@ static void split_ir(jit_State *J)
        nir->o = IR_CONV;  /* Pass through loword. */
        nir->op2 = (IRT_INT << 5) | IRT_INT;
        hi = split_emit(J, IRT(ir->o == IR_NEG ? IR_BXOR : IR_BAND, IRT_SOFTFP),
-                       hisubst[ir->op1], hisubst[ir->op2]);
+              hisubst[ir->op1],
+              lj_ir_kint(J, (int32_t)(0x7fffffffu + (ir->o == IR_NEG))));
        break;
       case IR_SLOAD:
        if ((nir->op2 & IRSLOAD_CONVERT)) {  /* Convert from int to number. */