From aed20093781541c19b5c7d6149eda71a7141bc1c Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 12 Sep 2012 16:58:47 +0200 Subject: Fix despecialization of ITERN when already running. --- src/vm_x86.dasc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vm_x86.dasc') diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index 8fe07a65..67984c6c 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc @@ -1566,7 +1566,7 @@ static void build_subroutines(BuildCtx *ctx) | add BASE, 8 | mov ARG3, BASE |.endif - | mov SAVE_PC, PC // Redundant (but a defined value). + | mov SAVE_PC, PC // Needed for ITERN fallback. | call extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) | // Flag returned in eax (RD). | mov BASE, L:RB->base @@ -5433,6 +5433,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | cmp byte CFUNC:RB->ffid, FF_next_N; jne >5 | branchPC RD | mov dword [BASE+RA*8-8], 0 // Initialize control var. + | mov dword [BASE+RA*8-4], 0xfffe7fff |1: | ins_next |5: // Despecialize bytecode if any of the checks fail. -- cgit v1.2.3-55-g6feb