aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2026-01-05 22:17:53 +0100
committerQuentin Carbonneaux <[email protected]>2026-01-05 22:19:53 +0100
commit03da40271ff917a6d036c5684b500e315c0f8515 (patch)
tree9a2173eab0a36908f0dc350090ad43c521b6e3fc
parent120f316162879b6165deba77815cd4193fb2fb59 (diff)
rv64: fix invalid float immediates
Thanks to Luke Graham for reporting and fixing this issue.
-rw-r--r--rv64/isel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rv64/isel.c b/rv64/isel.c
index 000c112..ca62359 100644
--- a/rv64/isel.c
+++ b/rv64/isel.c
@@ -31,6 +31,7 @@ fixarg(Ref *r, int k, Ins *i, Fn *fn)
c = &fn->con[r0.val];
if (c->type == CAddr && memarg(r, op, i))
break;
+ if (KBASE(k) == 0)
if (c->type == CBits && immarg(r, op, i))
if (-2048 <= c->bits.i && c->bits.i < 2048)
break;