summaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 4537e1d5..ae14b3b6 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -1155,6 +1155,8 @@ static void asm_newref(ASMState *as, IRIns *ir)
1155 IRRef args[3]; 1155 IRRef args[3];
1156 IRIns *irkey; 1156 IRIns *irkey;
1157 Reg tmp; 1157 Reg tmp;
1158 if (ir->r == RID_SINK) /* Sink newref. */
1159 return;
1158 args[0] = ASMREF_L; /* lua_State *L */ 1160 args[0] = ASMREF_L; /* lua_State *L */
1159 args[1] = ir->op1; /* GCtab *t */ 1161 args[1] = ir->op1; /* GCtab *t */
1160 args[2] = ASMREF_TMP1; /* cTValue *key */ 1162 args[2] = ASMREF_TMP1; /* cTValue *key */
@@ -1259,6 +1261,10 @@ static void asm_fxstore(ASMState *as, IRIns *ir)
1259 RegSet allow = RSET_GPR; 1261 RegSet allow = RSET_GPR;
1260 Reg src = RID_NONE, osrc = RID_NONE; 1262 Reg src = RID_NONE, osrc = RID_NONE;
1261 int32_t k = 0; 1263 int32_t k = 0;
1264 if (ir->r == RID_SINK) { /* Sink store. */
1265 asm_snap_prep(as);
1266 return;
1267 }
1262 /* The IRT_I16/IRT_U16 stores should never be simplified for constant 1268 /* The IRT_I16/IRT_U16 stores should never be simplified for constant
1263 ** values since mov word [mem], imm16 has a length-changing prefix. 1269 ** values since mov word [mem], imm16 has a length-changing prefix.
1264 */ 1270 */
@@ -1372,6 +1378,10 @@ static void asm_ahuvload(ASMState *as, IRIns *ir)
1372 1378
1373static void asm_ahustore(ASMState *as, IRIns *ir) 1379static void asm_ahustore(ASMState *as, IRIns *ir)
1374{ 1380{
1381 if (ir->r == RID_SINK) { /* Sink store. */
1382 asm_snap_prep(as);
1383 return;
1384 }
1375 if (irt_isnum(ir->t)) { 1385 if (irt_isnum(ir->t)) {
1376 Reg src = ra_alloc1(as, ir->op2, RSET_FPR); 1386 Reg src = ra_alloc1(as, ir->op2, RSET_FPR);
1377 asm_fuseahuref(as, ir->op1, RSET_GPR); 1387 asm_fuseahuref(as, ir->op1, RSET_GPR);
@@ -2251,7 +2261,10 @@ static void asm_hiop(ASMState *as, IRIns *ir)
2251 asm_comp_int64(as, ir); 2261 asm_comp_int64(as, ir);
2252 return; 2262 return;
2253 } else if ((ir-1)->o == IR_XSTORE) { 2263 } else if ((ir-1)->o == IR_XSTORE) {
2254 asm_fxstore(as, ir); 2264 if ((ir-1)->r == RID_SINK)
2265 asm_snap_prep(as);
2266 else
2267 asm_fxstore(as, ir);
2255 return; 2268 return;
2256 } 2269 }
2257 if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ 2270 if (!usehi) return; /* Skip unused hiword op for all remaining ops. */