int main(int argc, char **argv)
{
long x=1,y=2,z=3;
z = top(x,y);
return z;
}
long top(long x,long y) {
x = x + y;
return leaf(x,y);
}
long leaf(long y,long x) {
z = y - x;
return z;
}
1 00000000004004d6 <leaf>:
2 4004d6:48 89 f8 mov %rdi,%rax
3 4004d9:48 29 f0 sub %rsi,%rax
4 4004dc:c3 retq
5 00000000004004dd <top>:
6 4004dd:48 01 f7 add %rsi,%rdi
7 4004e0:b8 00 00 00 00 mov $0x0,%eax
8 4004e5:e8 ec ff ff ff callq 4004d6
9 4004ea:f3 c3 reps retq
10 00000000004004ec <main>:
11 4004ec:be 09 00 00 00 mov $0x9,%esi
12 4004f1:bf 03 00 00 00 mov $0x3,%edi
13 4004f6:68 00 00 00 00 mov $0x0,%eax
14 4004fb:e8 dd ff ff ff callq 4004dd
15 400500:f3 c3 reps retq
Fill the table with appropriate values right before the instruction executes, not after the instruction finished executing. Instructions are dependent and values may change as instructions execute.
Line # PC Instruction %rdi %rsi %rax %rsp *%rsp
14 1 2 3 0x7fffffffe700 ------
6
7
8
2