aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64/emit.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-16 17:25:20 +0200
committerlemon <lsof@mailbox.org>2025-09-16 17:25:20 +0200
commit3d837a07483037b36254aaa8623151086f67c329 (patch)
treed094051d75f393dcc5508950acde31b179ee69f0 /amd64/emit.c
parent75db572e8a7a144b3d6fdc2b148ac3921f77f2b2 (diff)
fix some more codegen bugs for symbol constants
Diffstat (limited to 'amd64/emit.c')
-rw-r--r--amd64/emit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/amd64/emit.c b/amd64/emit.c
index 238aea6..739e89d 100644
--- a/amd64/emit.c
+++ b/amd64/emit.c
@@ -952,8 +952,7 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc
case Olth: case Ogth: case Olte: case Ogte:
case Oulth: case Ougth: case Oulte: case Ougte:
dst = mkregoper(ins->l);
- /* TODO handle float cmps */
- src = mkimmdatregoper(ins->r);
+ src = ref2oper(ins->r);
regzeroed = 0;
if (ins->reg && dst.reg != ins->reg-1 && (src.t != OREG || src.reg != ins->reg-1)) {
/* can zero output reg before test instruction (differs from both inputs) */