diff options
| -rw-r--r-- | amd64/emit.c | 1 | ||||
| -rw-r--r-- | amd64/isel.c | 5 | ||||
| -rw-r--r-- | c/c.c | 4 | ||||
| -rw-r--r-- | ir/builder.c | 2 | ||||
| -rw-r--r-- | ir/fold.c | 1 | ||||
| -rw-r--r-- | ir/op.def | 1 |
6 files changed, 5 insertions, 9 deletions
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); @@ -3255,7 +3255,7 @@ compileexpr(struct function *fn, const struct expr *ex, bool discard) case EADDROF: return expraddr(fn, sub); case EMUL: - op = isunsigned(ex->ty) ? Oumul : Omul; + op = Omul; goto BinArith; case EDIV: op = isunsigned(ex->ty) ? Oudiv : Odiv; @@ -3382,7 +3382,7 @@ compileexpr(struct function *fn, const struct expr *ex, bool discard) if (discard) return NOREF; return bitsiz ? narrow(fn, cls, sub[0].ty, q, bitsiz) : q; case ESETMUL: - op = isunsigned(ex->ty) ? Oumul : Omul; + op = Omul; goto Compound; case ESETDIV: op = isunsigned(ex->ty) ? Oudiv : Odiv; diff --git a/ir/builder.c b/ir/builder.c index 9c6a0ef..b177a39 100644 --- a/ir/builder.c +++ b/ir/builder.c @@ -18,7 +18,7 @@ irbinop(struct function *fn, enum op op, enum irclass k, union ref l, union ref case Osub: if (r.bits == ZEROREF.bits) return l; /* x +/- 0 ==> x */ break; - case Omul: case Oumul: + case Omul: if (isnumcon(l)) rswap(l, r); /* put const in rhs */ if (r.bits == ZEROREF.bits) /* x * 0 ==> 0 */ return ZEROREF; @@ -27,7 +27,6 @@ foldint(enum op op, enum irclass k, union ref lr, union ref rr) case Oadd: x = l.u + r.u; break; case Osub: x = l.u - r.u; break; case Omul: x = l.u * r.u; break; - case Oumul: x = l.u * r.u; break; case Odiv: x = w ? l.s / r.s : (int)l.s / (int)r.s; break; case Oudiv: x = w ? l.u / r.u : (uint)l.u / (uint)r.u; break; case Orem: x = w ? l.s % r.s : (int)l.s % (int)r.s; break; @@ -23,7 +23,6 @@ _(extu32, 1) _(add, 2) _(sub, 2) _(mul, 2) -_(umul, 2) _(div, 2) _(udiv, 2) _(rem, 2) |