{
const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey];
IRRef args[3];
- if (ir->r == RID_SINK) /* Sink newref. */
+ if (ir->r == RID_SINK)
return;
args[0] = ASMREF_L; /* lua_State *L */
args[1] = ir->op1; /* GCtab *t */
static void asm_fstore(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- } else {
+ if (ir->r != RID_SINK) {
Reg src = ra_alloc1(as, ir->op2, RSET_GPR);
IRIns *irf = IR(ir->op1);
Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src));
static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- } else {
+ if (ir->r != RID_SINK) {
Reg src = ra_alloc1(as, ir->op2, RSET_GPR);
asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1,
rset_exclude(RSET_GPR, src), ofs);
static void asm_ahustore(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- } else {
+ if (ir->r != RID_SINK) {
RegSet allow = RSET_GPR;
Reg idx, src = RID_NONE, type = RID_NONE;
int32_t ofs = 0;
asm_fpmin_max(as, ir-1, (ir-1)->o == IR_MIN ? CC_HI : CC_LO);
return;
} else if ((ir-1)->o == IR_XSTORE) {
- if ((ir-1)->r == RID_SINK)
- asm_snap_prep(as);
- else
+ if ((ir-1)->r != RID_SINK)
asm_xstore(as, ir, 4);
return;
}
static void asm_newref(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink newref. */
- return;
- } else {
+ if (ir->r != RID_SINK) {
const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey];
IRRef args[3];
args[0] = ASMREF_L; /* lua_State *L */
static void asm_fstore(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- return;
- } else {
+ if (ir->r != RID_SINK) {
Reg src = ra_alloc1z(as, ir->op2, RSET_GPR);
IRIns *irf = IR(ir->op1);
Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src));
static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- return;
- } else {
+ if (ir->r != RID_SINK) {
Reg src = ra_alloc1z(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR);
asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1,
rset_exclude(RSET_GPR, src), ofs);
RegSet allow = RSET_GPR;
Reg idx, src = RID_NONE, type = RID_NONE;
int32_t ofs = 0;
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
+ if (ir->r == RID_SINK)
return;
- }
if (irt_isnum(ir->t)) {
src = ra_alloc1(as, ir->op2, RSET_FPR);
} else {
return;
} else if ((ir-1)->o == IR_XSTORE) {
as->curins--; /* Handle both stores here. */
- if ((ir-1)->r == RID_SINK) {
- asm_snap_prep(as);
- } else {
+ if ((ir-1)->r != RID_SINK) {
asm_xstore(as, ir, LJ_LE ? 4 : 0);
asm_xstore(as, ir-1, LJ_LE ? 0 : 4);
}
{
const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey];
IRRef args[3];
- if (ir->r == RID_SINK) /* Sink newref. */
+ if (ir->r == RID_SINK)
return;
args[0] = ASMREF_L; /* lua_State *L */
args[1] = ir->op1; /* GCtab *t */
static void asm_fstore(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
- } else {
+ if (ir->r != RID_SINK) {
Reg src = ra_alloc1(as, ir->op2, RSET_GPR);
IRIns *irf = IR(ir->op1);
Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src));
static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs)
{
IRIns *irb;
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
+ if (ir->r == RID_SINK)
return;
- }
if (ofs == 0 && mayfuse(as, ir->op2) && (irb = IR(ir->op2))->o == IR_BSWAP &&
ra_noreg(irb->r) && (irt_isint(ir->t) || irt_isu32(ir->t))) {
/* Fuse BSWAP with XSTORE to stwbrx. */
RegSet allow = RSET_GPR;
Reg idx, src = RID_NONE, type = RID_NONE;
int32_t ofs = AHUREF_LSX;
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
+ if (ir->r == RID_SINK)
return;
- }
if (irt_isnum(ir->t)) {
src = ra_alloc1(as, ir->op2, RSET_FPR);
} else {
return;
} else if ((ir-1)->o == IR_XSTORE) {
as->curins--; /* Handle both stores here. */
- if ((ir-1)->r == RID_SINK) {
- asm_snap_prep(as);
- } else {
+ if ((ir-1)->r != RID_SINK) {
asm_xstore(as, ir, 0);
asm_xstore(as, ir-1, 4);
}
IRRef args[3];
IRIns *irkey;
Reg tmp;
- if (ir->r == RID_SINK) /* Sink newref. */
+ if (ir->r == RID_SINK)
return;
args[0] = ASMREF_L; /* lua_State *L */
args[1] = ir->op1; /* GCtab *t */
RegSet allow = RSET_GPR;
Reg src = RID_NONE, osrc = RID_NONE;
int32_t k = 0;
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
+ if (ir->r == RID_SINK)
return;
- }
/* The IRT_I16/IRT_U16 stores should never be simplified for constant
** values since mov word [mem], imm16 has a length-changing prefix.
*/
static void asm_ahustore(ASMState *as, IRIns *ir)
{
- if (ir->r == RID_SINK) { /* Sink store. */
- asm_snap_prep(as);
+ if (ir->r == RID_SINK)
return;
- }
if (irt_isnum(ir->t)) {
Reg src = ra_alloc1(as, ir->op2, RSET_FPR);
asm_fuseahuref(as, ir->op1, RSET_GPR);
asm_comp_int64(as, ir);
return;
} else if ((ir-1)->o == IR_XSTORE) {
- if ((ir-1)->r == RID_SINK)
- asm_snap_prep(as);
- else
+ if ((ir-1)->r != RID_SINK)
asm_fxstore(as, ir);
return;
}