From 3cf75f807badf1d10e7bbeeeaaee13ed3eeb6bff Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 29 Nov 2025 19:37:43 +0100 Subject: amd64/isel: fix addressing index shift being possibly too large to encode (duh) --- amd64/isel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'amd64/isel.c') diff --git a/amd64/isel.c b/amd64/isel.c index 9065ccf..3611670 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -214,9 +214,9 @@ ascale(struct addr *addr, union ref a, union ref b) { if (b.t != RICON) return 0; if (addr->index.bits) return 0; + if ((unsigned)b.i > 3) return 0; if (a.t == RREG) { Scaled: - if ((unsigned)b.i > 3) return 0; addr->index = a; addr->shift = b.i; return 1; -- cgit v1.2.3