diff options
| author | Mike Pall <mike> | 2023-12-11 13:04:43 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2023-12-11 13:04:43 +0100 |
| commit | 29b0b282f59ac533313199f4f7be79490b7eee51 (patch) | |
| tree | 38189ea243f1b11dfc5317791bc0825b70800344 /src | |
| parent | ff204d0350575cf710f6f4af982db146cb454e1a (diff) | |
| parent | 9bdfd34dccb913777be0efcc6869b6eeb5b9b43b (diff) | |
| download | luajit-29b0b282f59ac533313199f4f7be79490b7eee51.tar.gz luajit-29b0b282f59ac533313199f4f7be79490b7eee51.tar.bz2 luajit-29b0b282f59ac533313199f4f7be79490b7eee51.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_snap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 93eb8a29..7d7347a1 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
| @@ -557,13 +557,15 @@ void lj_snap_replay(jit_State *J, GCtrace *T) | |||
| 557 | IRRef refp = snap_ref(sn); | 557 | IRRef refp = snap_ref(sn); |
| 558 | IRIns *ir = &T->ir[refp]; | 558 | IRIns *ir = &T->ir[refp]; |
| 559 | if (regsp_reg(ir->r) == RID_SUNK) { | 559 | if (regsp_reg(ir->r) == RID_SUNK) { |
| 560 | uint8_t m; | ||
| 560 | if (J->slot[snap_slot(sn)] != snap_slot(sn)) continue; | 561 | if (J->slot[snap_slot(sn)] != snap_slot(sn)) continue; |
| 561 | pass23 = 1; | 562 | pass23 = 1; |
| 562 | lj_assertJ(ir->o == IR_TNEW || ir->o == IR_TDUP || | 563 | lj_assertJ(ir->o == IR_TNEW || ir->o == IR_TDUP || |
| 563 | ir->o == IR_CNEW || ir->o == IR_CNEWI, | 564 | ir->o == IR_CNEW || ir->o == IR_CNEWI, |
| 564 | "sunk parent IR %04d has bad op %d", refp - REF_BIAS, ir->o); | 565 | "sunk parent IR %04d has bad op %d", refp - REF_BIAS, ir->o); |
| 565 | if (ir->op1 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op1); | 566 | m = lj_ir_mode[ir->o]; |
| 566 | if (ir->op2 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op2); | 567 | if (irm_op1(m) == IRMref) snap_pref(J, T, map, nent, seen, ir->op1); |
| 568 | if (irm_op2(m) == IRMref) snap_pref(J, T, map, nent, seen, ir->op2); | ||
| 567 | if (LJ_HASFFI && ir->o == IR_CNEWI) { | 569 | if (LJ_HASFFI && ir->o == IR_CNEWI) { |
| 568 | if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) | 570 | if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) |
| 569 | snap_pref(J, T, map, nent, seen, (ir+1)->op2); | 571 | snap_pref(J, T, map, nent, seen, (ir+1)->op2); |
| @@ -591,14 +593,16 @@ void lj_snap_replay(jit_State *J, GCtrace *T) | |||
| 591 | IRIns *ir = &T->ir[refp]; | 593 | IRIns *ir = &T->ir[refp]; |
| 592 | if (regsp_reg(ir->r) == RID_SUNK) { | 594 | if (regsp_reg(ir->r) == RID_SUNK) { |
| 593 | TRef op1, op2; | 595 | TRef op1, op2; |
| 596 | uint8_t m; | ||
| 594 | if (J->slot[snap_slot(sn)] != snap_slot(sn)) { /* De-dup allocs. */ | 597 | if (J->slot[snap_slot(sn)] != snap_slot(sn)) { /* De-dup allocs. */ |
| 595 | J->slot[snap_slot(sn)] = J->slot[J->slot[snap_slot(sn)]]; | 598 | J->slot[snap_slot(sn)] = J->slot[J->slot[snap_slot(sn)]]; |
| 596 | continue; | 599 | continue; |
| 597 | } | 600 | } |
| 598 | op1 = ir->op1; | 601 | op1 = ir->op1; |
| 599 | if (op1 >= T->nk) op1 = snap_pref(J, T, map, nent, seen, op1); | 602 | m = lj_ir_mode[ir->o]; |
| 603 | if (irm_op1(m) == IRMref) op1 = snap_pref(J, T, map, nent, seen, op1); | ||
| 600 | op2 = ir->op2; | 604 | op2 = ir->op2; |
| 601 | if (op2 >= T->nk) op2 = snap_pref(J, T, map, nent, seen, op2); | 605 | if (irm_op2(m) == IRMref) op2 = snap_pref(J, T, map, nent, seen, op2); |
| 602 | if (LJ_HASFFI && ir->o == IR_CNEWI) { | 606 | if (LJ_HASFFI && ir->o == IR_CNEWI) { |
| 603 | if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) { | 607 | if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) { |
| 604 | lj_needsplit(J); /* Emit joining HIOP. */ | 608 | lj_needsplit(J); /* Emit joining HIOP. */ |
