Question: (15 pt) A C function with the declaration of void func(int pl, int *p2) is compiled to the following body of the IA32 assembly code
(15 pt) A C function with the declaration of void func(int pl, int *p2) is compiled to the following body of the IA32 assembly code 4. func : pushl %ebp movl %esp, %ebp movl 12(%ebp), %eax test1 %eax, %eax je L3 movl (%eax), %edx movi 80%ebp), %eax test! %eax, %eax je .L3 movl (%eax), %eax addl %eax, %edx movl 12(%ebp), %eax movl %edx, (%eax) movl popl %ebp ret on the right. Write the equivalent C code for the function. void func(int *p1, int *p2) 1.3: %ebp, %esp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
