diff options
| author | 2025-11-29 19:37:43 +0100 | |
|---|---|---|
| committer | 2025-11-29 19:54:03 +0100 | |
| commit | 3cf75f807badf1d10e7bbeeeaaee13ed3eeb6bff (patch) | |
| tree | 40d0d8b4ca775190e815a918985e87d2b80d7e3d /amd64/isel.c | |
| parent | 61d64a4ce2550288d4b97128893f3d53d129bc17 (diff) | |
amd64/isel: fix addressing index shift being possibly too large to encode (duh)
Diffstat (limited to 'amd64/isel.c')
| -rw-r--r-- | amd64/isel.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |