aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64/isel.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-17 14:31:54 +0200
committerlemon <lsof@mailbox.org>2023-06-17 14:31:54 +0200
commitec28e9057e84b92acabb7ebf9122af59738917ad (patch)
treefe532fac21015cde652ee0472efc86569e30a9aa /amd64/isel.c
parent78b7a3a6874abad6d2326093287554f3e565a382 (diff)
misc
Diffstat (limited to 'amd64/isel.c')
-rw-r--r--amd64/isel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index 8d19cad..7725013 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -190,7 +190,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
case Osub:
if (ins->r.bits == mkref(RICON, 1).bits) {
/* sub x,1 -> dec x */
- ins->op = Oxdec;
+ ins->op = op = Oxdec;
ins->r = NOREF;
} else if (iscon(ins->l)) {
/* sub imm, x -> sub x, imm; neg x */
@@ -204,13 +204,13 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
case Oadd:
if (ins->l.bits == mkref(RICON, 1).bits) {
/* add 1,x -> inc x */
- ins->op = Oxinc;
+ ins->op = op = Oxinc;
ins->l = ins->r;
ins->r = NOREF;
goto ALU;
} else if (ins->r.bits == mkref(RICON, 1).bits) {
/* add x,1 -> inc x */
- ins->op = Oxinc;
+ ins->op = op = Oxinc;
ins->r = NOREF;
goto ALU;
} else if (kisint(ins->cls) && (addarg4addrp(ins->l) || addarg4addrp(ins->r))) {