I'm given these leal
instructions and I have to fill in what they mean.
I've been trying to study how the leal
instruction acts, but I've been having difficulty finding relevant material around the web. What I found is
leal (src1, src2), dst //dst = src2 + src1
This info doesn't give enough information, because the leal
instruction is far more complex than that.
How is this looking?
Assume %eax
holds the value x and %ecx
holds the value y. Fill in the table.
%edx = x + 6___________leal 6(%eax),%edx
%edx = x + y___________leal (%eax,%ecx),%edx
%edx = x * 5y___________leal (%eax,%ecx,4),%edx
%edx = 9x + 7___________leal 7(%eax,%eax,8),%edx
%edx = 4y + 10___________leal 0xA(,%ecx,4),%edx
%edx = x + 3y + 9___________leal 9(%eax,%ecx,2),%edx