Question
Consider the following C functions and assembly code: int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; } int
Consider the following C functions and assembly code:
int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; }
int fun3(int *ap, int *bp) { int a = bp; *bp += *ap; return a; }
int fun4(int *ap, int *bp) { int a = *ap; int b = *bp; return a+b; }
int fun5(int *ap, int *bp) { int b = *bp; *bp += *ap; return b; } int fun6(int *ap, int *bp) { int a = *ap; *bp += *ap; return a; } pushl %ebp movl %esp,%ebp movl 8(%ebp),%edx movl 12(%ebp),%eax movl %ebp,%esp movl (%edx),%edx addl %edx,(%eax) movl %edx,%eax popl %ebp ret
Which of the functions compiled into the assembly code shown above?
Group of answer choices
fun2
fun4
fun5
fun3
fun6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started