summaryrefslogtreecommitdiff
path: root/src/lj_asm_ppc.h
diff options
context:
space:
mode:
authorMike Pall <mike>2012-07-03 23:19:45 +0200
committerMike Pall <mike>2012-07-03 23:19:45 +0200
commit4da7ffc34bd3e431057d0f3edd6ded342a9d6e34 (patch)
treef04371f6ef0859465e70a02924aea5d752b836fe /src/lj_asm_ppc.h
parentd5b9d845386a4442d2bc672a25463735a66b4e58 (diff)
downloadluajit2-4da7ffc34bd3e431057d0f3edd6ded342a9d6e34.tar.gz
Remove unneeded snapshot preps for sunk stores.
Diffstat (limited to 'src/lj_asm_ppc.h')
-rw-r--r--src/lj_asm_ppc.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 85b87bd5..86052577 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -773,7 +773,7 @@ static void asm_newref(ASMState *as, IRIns *ir)
{
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 */
@@ -894,9 +894,7 @@ static void asm_fload(ASMState *as, IRIns *ir)
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));
@@ -918,10 +916,8 @@ static void asm_xload(ASMState *as, IRIns *ir)
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. */
@@ -978,10 +974,8 @@ static void asm_ahustore(ASMState *as, IRIns *ir)
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 {
@@ -1761,9 +1755,7 @@ static void asm_hiop(ASMState *as, IRIns *ir)
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);
}