diff options
-rw-r--r-- | src/lj_asm_ppc.h | 7 |
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)) { |