aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_ppc.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_asm_ppc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 5ea4d47d..546b8e5d 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -1169,7 +1169,12 @@ dotypecheck:
1169 } else { 1169 } else {
1170 if ((ir->op2 & IRSLOAD_TYPECHECK)) { 1170 if ((ir->op2 & IRSLOAD_TYPECHECK)) {
1171 asm_guardcc(as, CC_NE); 1171 asm_guardcc(as, CC_NE);
1172 emit_ai(as, PPCI_CMPWI, RID_TMP, irt_toitype(t)); 1172 if ((ir->op2 & IRSLOAD_KEYINDEX)) {
1173 emit_ai(as, PPCI_CMPWI, RID_TMP, (LJ_KEYINDEX & 0xffff));
1174 emit_asi(as, PPCI_XORIS, RID_TMP, RID_TMP, (LJ_KEYINDEX >> 16));
1175 } else {
1176 emit_ai(as, PPCI_CMPWI, RID_TMP, irt_toitype(t));
1177 }
1173 type = RID_TMP; 1178 type = RID_TMP;
1174 } 1179 }
1175 if (ra_hasreg(dest)) emit_tai(as, PPCI_LWZ, dest, base, ofs); 1180 if (ra_hasreg(dest)) emit_tai(as, PPCI_LWZ, dest, base, ofs);