From 821adf9e5c962c97e46f3a215c876bc10916e302 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 21 Nov 2025 16:52:46 +0100 Subject: remove umul --- amd64/emit.c | 1 - amd64/isel.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'amd64') diff --git a/amd64/emit.c b/amd64/emit.c index a7bf542..5a63a61 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -1041,7 +1041,6 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc break; case Omul: if (kisint(cls)) - case Oumul: Ximul(pcode, cls, reg2oper(ins->reg-1), ref2oper(ins->l), ref2oper(ins->r)); else Xmulf(pcode, cls, reg2oper(ins->reg-1), ref2oper(ins->r)); diff --git a/amd64/isel.c b/amd64/isel.c index b17e541..2ae9a92 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -15,7 +15,6 @@ static const uchar opflags[NOPER] = { [Oadd] = ZF|CLOBF, [Osub] = ZF|CLOBF, [Omul] = CLOBF, - [Oumul] = CLOBF, [Odiv] = CLOBF, [Oudiv] = CLOBF, [Orem] = CLOBF, @@ -457,7 +456,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi) } } /* fallthru */ - case Omul: case Oumul: + case Omul: case Oand: case Oxor: case Oior: /* commutative ops */ if (iscon(ins->l)) @@ -473,7 +472,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi) case Onot: ALU: if (!(op == Oadd && kisint(ins->cls))) /* 3-address add is lea */ - if (!(in_range(op, Omul, Oumul) && kisint(ins->cls) && isimm32(ins->r))) /* for (I)MUL r,r/m,imm */ + if (!(op == Omul && kisint(ins->cls) && isimm32(ins->r))) /* for (I)MUL r,r/m,imm */ ins->inplace = 1; if (iscon(ins->l)) { fixarg(&ins->l, ins, blk, curi); -- cgit v1.2.3