I just want to make sure that I read this correctly:
movl 12(%ebp), %edx
leal (%edx, %edx, 4), %eax
I read the first line as: edx = [epb + 12]and the second line:eax = edx + edx*4
Can anyone clarify?
Also, what if I had the following two lines:
leal (%edx, %edx, 4), %eax
leal (%edx, %edx, 2), %eax
As soon as the second line is completed, will the register be overwritten eax?
And eax = edx + edx*4multiplies the address by 4? Or the contents of the address at 4?
source
share