aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-21 16:52:46 +0100
committerlemon <lsof@mailbox.org>2025-11-21 16:52:46 +0100
commit821adf9e5c962c97e46f3a215c876bc10916e302 (patch)
treeafbde7e0cb5f073b6bdbec1d25e086f5e094b31d /amd64
parentec4cfe9db9afc1d1c633a922174f5bb0685b0c32 (diff)
remove umul
Diffstat (limited to 'amd64')
-rw-r--r--amd64/emit.c1
-rw-r--r--amd64/isel.c5
2 files changed, 2 insertions, 4 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);