diff options
author | Mike Pall <mike> | 2011-11-11 01:07:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-11-11 01:07:34 +0100 |
commit | fa1675baad93dbe503d834eb380b2a8efdf301fe (patch) | |
tree | 1e383c9fc845dc8a594e563078645d1e22b17f9f | |
parent | 4bcf2b40fed5390e3c36b14140c652c81a53765b (diff) | |
download | luajit-fa1675baad93dbe503d834eb380b2a8efdf301fe.tar.gz luajit-fa1675baad93dbe503d834eb380b2a8efdf301fe.tar.bz2 luajit-fa1675baad93dbe503d834eb380b2a8efdf301fe.zip |
ARM: Fix IR splitting for softfp XLOAD.
-rw-r--r-- | src/lj_asm.c | 4 | ||||
-rw-r--r-- | src/lj_opt_split.c | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 9fe53416..49fd45b4 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -809,8 +809,10 @@ static void asm_snap_alloc(ASMState *as) | |||
809 | IRRef ref = snap_ref(sn); | 809 | IRRef ref = snap_ref(sn); |
810 | if (!irref_isk(ref)) { | 810 | if (!irref_isk(ref)) { |
811 | asm_snap_alloc1(as, ref); | 811 | asm_snap_alloc1(as, ref); |
812 | if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM)) | 812 | if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM)) { |
813 | lua_assert(irt_type(IR(ref+1)->t) == IRT_SOFTFP); | ||
813 | asm_snap_alloc1(as, ref+1); | 814 | asm_snap_alloc1(as, ref+1); |
815 | } | ||
814 | } | 816 | } |
815 | } | 817 | } |
816 | } | 818 | } |
diff --git a/src/lj_opt_split.c b/src/lj_opt_split.c index 31abe419..913a7a0a 100644 --- a/src/lj_opt_split.c +++ b/src/lj_opt_split.c | |||
@@ -313,13 +313,21 @@ static void split_ir(jit_State *J) | |||
313 | case IR_STRTO: | 313 | case IR_STRTO: |
314 | hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); | 314 | hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); |
315 | break; | 315 | break; |
316 | case IR_XLOAD: | 316 | case IR_XLOAD: { |
317 | hi = split_emit(J, IRT(IR_XLOAD, IRT_SOFTFP), | 317 | IRIns inslo = *nir; /* Save/undo the emit of the lo XLOAD. */ |
318 | split_ptr(J, oir, ir->op1), ir->op2); | 318 | J->cur.nins--; |
319 | #if LJ_BE | 319 | hi = split_ptr(J, oir, ir->op1); /* Insert the hiref ADD. */ |
320 | nref = lj_ir_nextins(J); | ||
321 | nir = IR(nref); | ||
322 | *nir = inslo; /* Re-emit lo XLOAD immediately before hi XLOAD. */ | ||
323 | hi = split_emit(J, IRT(IR_XLOAD, IRT_SOFTFP), hi, ir->op2); | ||
324 | #if LJ_LE | ||
325 | ir->prev = nref; | ||
326 | #else | ||
320 | ir->prev = hi; hi = nref; | 327 | ir->prev = hi; hi = nref; |
321 | #endif | 328 | #endif |
322 | break; | 329 | break; |
330 | } | ||
323 | case IR_ASTORE: case IR_HSTORE: case IR_USTORE: | 331 | case IR_ASTORE: case IR_HSTORE: case IR_USTORE: |
324 | split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nir->op1, hisubst[ir->op2]); | 332 | split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nir->op1, hisubst[ir->op2]); |
325 | break; | 333 | break; |