Question: Explain each part of the program? Foo1, Foo2, Foo3, Foo4, Foo5, Foo6 fool: pushl Sebp movl %esp, lebp novi 8 (%ebp), %eax shrl $31, Seax

Explain each part of the program? Foo1, Foo2, Foo3, Foo4, Foo5, Foo6  Explain each part of the program? Foo1, Foo2, Foo3, Foo4, Foo5,

fool: pushl Sebp movl %esp, lebp novi 8 (%ebp), %eax shrl $31, Seax popl %ebp ret int choice1 (int x) I1 foo5 return x1 16 foo2: pushl Sebp movi Sesp, Sebp int choice2 (int x) // foo popl %ebp ret return 14x foo3: pushl Sebp int choice3 (int x) 11 foo2 movl 8(Sebp), Seax addl %eax, %eax return x31) leal 15 (teax), %edx testl Seax, Seax cmovs tedx,eax fool corresponds to choice-choice4 foo2 corresponds to choice-choice3 foo3 corresponds to choice choice2 foo4 cormesponds to choice choice5 foo5 corresponds to choice choicel foo6 corresponds to choice choice6 sar1 S4, %eax popl %ebp ret foo6: pushl Sebp movl %esp, tebp movi 8 (tebp), %eax sari $31. teax popi Sebp ret fool: pushl Sebp movl %esp, lebp novi 8 (%ebp), %eax shrl $31, Seax popl %ebp ret int choice1 (int x) I1 foo5 return x1 16 foo2: pushl Sebp movi Sesp, Sebp int choice2 (int x) // foo popl %ebp ret return 14x foo3: pushl Sebp int choice3 (int x) 11 foo2 movl 8(Sebp), Seax addl %eax, %eax return x31) leal 15 (teax), %edx testl Seax, Seax cmovs tedx,eax fool corresponds to choice-choice4 foo2 corresponds to choice-choice3 foo3 corresponds to choice choice2 foo4 cormesponds to choice choice5 foo5 corresponds to choice choicel foo6 corresponds to choice choice6 sar1 S4, %eax popl %ebp ret foo6: pushl Sebp movl %esp, tebp movi 8 (tebp), %eax sari $31. teax popi Sebp ret

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!