rv64: fix invalid float immediates

Thanks to Luke Graham for reporting
and fixing this issue.
This commit is contained in:
Quentin Carbonneaux 2026-01-05 22:17:53 +01:00
parent 120f316162
commit 03da40271f

View File

@ -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;