Question: Consider the following C functions and assembly code: int fun4 (int *ap, int *bp) ( int a = *ap; int bbp; return a+b; })

Consider the following C functions and assembly code: int fun4 (int *ap,  

Consider the following C functions and assembly code: int fun4 (int *ap, int *bp) ( int a = *ap; int bbp; return a+b; }) pushl ebp movl esp, ebp int fun5 (int *ap, int *bp) { int bbp; *bp + *ap; return b; } movl 8 (sebp), sedx movl 12 (ebp), teax movl ebp, esp movl (sedx), edx addl sedx, (seax) movl edx, eax popl tebp int fun6 (int *ap, int *bp) ret int a *ap; bpap: return a; } Which of the functions compiled into the assembly code shown?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1Function Prologue pushl ebp movl esp ebp 2Loading Arguments movl 8ebp edx Load the first argument a... View full answer

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 Programming Questions!