by jbaczuk · 4y ago · 0 comments
ldr x, [addr, idx]
it just does sub t1, idx, #1
ldr x, [addr, t1]
If we're talking about C, accessing invalid/OOB indices is undefined and so if idx happens to be zero and unsigned, we'll overflow and hit something unexpected, which is fine.