News for hackers. Stuff that matters.
Re:Does a compiler use all x86 instructions? (2010) by Someone on Wednesday August 24, 2016 @03:32PM (#12354610)
The lea instruction is designed for array indexing. See http://stackoverflow.com/a/1665570
Re:Does a compiler use all x86 instructions? (2010) by rdtsc on Wednesday August 24, 2016 @06:21PM (#12355703)
That's what I mean by pointer arithmetic. It seems it was intended to calculate memory addresses.

It happens to do adds and multiplications as well.

I understand things like a[i] would be equivalent in general to *(a+i)