Add IR_PVAL instruction for non-slot parent links.

This commit is contained in:
Mike Pall 2012-07-02 22:47:20 +02:00
parent 5d0115ef8d
commit 0688de5483
3 changed files with 4 additions and 1 deletions

View File

@ -1287,7 +1287,7 @@ static void asm_head_side(ASMState *as)
IRIns *ir = IR(i);
RegSP rs;
lua_assert((ir->o == IR_SLOAD && (ir->op2 & IRSLOAD_PARENT)) ||
(LJ_SOFTFP && ir->o == IR_HIOP));
(LJ_SOFTFP && ir->o == IR_HIOP) || ir->o == IR_PVAL);
rs = as->parentmap[i - REF_FIRST];
if (ra_hasreg(ir->r)) {
rset_clear(allow, ir->r);

View File

@ -33,6 +33,7 @@
/* Miscellaneous ops. */ \
_(NOP, N , ___, ___) \
_(BASE, N , lit, lit) \
_(PVAL, N , lit, ___) \
_(GCSTEP, S , ___, ___) \
_(HIOP, S , ref, ref) \
_(LOOP, S , ___, ___) \

View File

@ -339,6 +339,8 @@ IRIns *lj_snap_regspmap(GCtrace *T, SnapNo snapno, IRIns *ir)
}
} else if (LJ_SOFTFP && ir->o == IR_HIOP) {
ref++;
} else if (ir->o == IR_PVAL) {
ref = ir->op1 + REF_BIAS;
} else {
break;
}