summaryrefslogtreecommitdiff
path: root/src/lj_asm_ppc.h
diff options
context:
space:
mode:
authorMike Pall <mike>2012-03-29 01:10:35 +0200
committerMike Pall <mike>2012-03-29 01:10:35 +0200
commit509ca0f0dbdd4854a8db54563d8f29c4566418e5 (patch)
tree35b3b96b431d964185c704b86875dd620f33cb14 /src/lj_asm_ppc.h
parent67773165e819e0fd495188fd02b28850317c1f40 (diff)
downloadluajit-509ca0f0dbdd4854a8db54563d8f29c4566418e5.tar.gz
luajit-509ca0f0dbdd4854a8db54563d8f29c4566418e5.tar.bz2
luajit-509ca0f0dbdd4854a8db54563d8f29c4566418e5.zip
PPC: Fix fusion of floating-point XLOAD/XSTORE.
Diffstat (limited to 'src/lj_asm_ppc.h')
-rw-r--r--src/lj_asm_ppc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 12f5d79f..69a4aec2 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -187,10 +187,11 @@ static void asm_fusexref(ASMState *as, PPCIns pi, Reg rt, IRRef ref,
187 ref = ir->op2; 187 ref = ir->op2;
188 } else { 188 } else {
189 /* NYI: Fuse ADD with constant. */ 189 /* NYI: Fuse ADD with constant. */
190 Reg right, left = ra_alloc2(as, ir, allow); 190 Reg tmp, right, left = ra_alloc2(as, ir, allow);
191 right = (left >> 8); left &= 255; 191 right = (left >> 8); left &= 255;
192 emit_fai(as, pi, rt, rt, ofs); 192 tmp = ra_scratch(as, rset_exclude(rset_exclude(allow, left), right));
193 emit_tab(as, PPCI_ADD, rt, left, right); 193 emit_fai(as, pi, rt, tmp, ofs);
194 emit_tab(as, PPCI_ADD, tmp, left, right);
194 return; 195 return;
195 } 196 }
196 if (!checki16(ofs)) { 197 if (!checki16(ofs)) {