]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
PPC: Fix fusion of floating-point XLOAD/XSTORE.
authorMike Pall <mike>
Wed, 28 Mar 2012 23:10:35 +0000 (01:10 +0200)
committerMike Pall <mike>
Wed, 28 Mar 2012 23:10:35 +0000 (01:10 +0200)
src/lj_asm_ppc.h

index 12f5d79feb6ed846c87d225a2fc0bb6f177e75e1..69a4aec212ae26ae6c06b35321b5506abf2cef72 100644 (file)
@@ -187,10 +187,11 @@ static void asm_fusexref(ASMState *as, PPCIns pi, Reg rt, IRRef ref,
        ref = ir->op2;
       } else {
        /* NYI: Fuse ADD with constant. */
-       Reg right, left = ra_alloc2(as, ir, allow);
+       Reg tmp, right, left = ra_alloc2(as, ir, allow);
        right = (left >> 8); left &= 255;
-       emit_fai(as, pi, rt, rt, ofs);
-       emit_tab(as, PPCI_ADD, rt, left, right);
+       tmp = ra_scratch(as, rset_exclude(rset_exclude(allow, left), right));
+       emit_fai(as, pi, rt, tmp, ofs);
+       emit_tab(as, PPCI_ADD, tmp, left, right);
        return;
       }
       if (!checki16(ofs)) {