Add missing check for LJ_KEYINDEX in ITERN recording.
Reported by dragonorloong. Analyzed by vfprintf. #827
This commit is contained in:
@@ -1169,7 +1169,12 @@ dotypecheck:
|
||||
} else {
|
||||
if ((ir->op2 & IRSLOAD_TYPECHECK)) {
|
||||
asm_guardcc(as, CC_NE);
|
||||
emit_ai(as, PPCI_CMPWI, RID_TMP, irt_toitype(t));
|
||||
if ((ir->op2 & IRSLOAD_KEYINDEX)) {
|
||||
emit_ai(as, PPCI_CMPWI, RID_TMP, (LJ_KEYINDEX & 0xffff));
|
||||
emit_asi(as, PPCI_XORIS, RID_TMP, RID_TMP, (LJ_KEYINDEX >> 16));
|
||||
} else {
|
||||
emit_ai(as, PPCI_CMPWI, RID_TMP, irt_toitype(t));
|
||||
}
|
||||
type = RID_TMP;
|
||||
}
|
||||
if (ra_hasreg(dest)) emit_tai(as, PPCI_LWZ, dest, base, ofs);
|
||||
|
||||
Reference in New Issue
Block a user