diff options
-rw-r--r-- | src/lj_asm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 0c794ebb..7ee9fd2f 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -460,7 +460,20 @@ static void ra_evictset(ASMState *as, RegSet drop) | |||
460 | /* Evict (rematerialize) all registers allocated to constants. */ | 460 | /* Evict (rematerialize) all registers allocated to constants. */ |
461 | static void ra_evictk(ASMState *as) | 461 | static void ra_evictk(ASMState *as) |
462 | { | 462 | { |
463 | RegSet work = ~as->freeset & RSET_ALL; | 463 | RegSet work; |
464 | #if !LJ_SOFTFP | ||
465 | work = ~as->freeset & RSET_FPR; | ||
466 | while (work) { | ||
467 | Reg r = rset_pickbot(work); | ||
468 | IRRef ref = regcost_ref(as->cost[r]); | ||
469 | if (emit_canremat(ref) && irref_isk(ref)) { | ||
470 | ra_rematk(as, ref); | ||
471 | checkmclim(as); | ||
472 | } | ||
473 | rset_clear(work, r); | ||
474 | } | ||
475 | #endif | ||
476 | work = ~as->freeset & RSET_GPR; | ||
464 | while (work) { | 477 | while (work) { |
465 | Reg r = rset_pickbot(work); | 478 | Reg r = rset_pickbot(work); |
466 | IRRef ref = regcost_ref(as->cost[r]); | 479 | IRRef ref = regcost_ref(as->cost[r]); |
@@ -483,7 +496,7 @@ static Reg ra_allock(ASMState *as, int32_t k, RegSet allow) | |||
483 | IRRef ref; | 496 | IRRef ref; |
484 | r = rset_pickbot(work); | 497 | r = rset_pickbot(work); |
485 | ref = regcost_ref(as->cost[r]); | 498 | ref = regcost_ref(as->cost[r]); |
486 | if (emit_canremat(ref) && | 499 | if (ref < ASMREF_L && |
487 | k == (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i)) | 500 | k == (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i)) |
488 | return r; | 501 | return r; |
489 | rset_clear(work, r); | 502 | rset_clear(work, r); |