Question: Write a C function func that performs the actions of the following assembly code. Your function must be named func. The function takes four arguments

Write a C function func that performs the actions of the following assembly code. Your function must be named func. The function takes four arguments passed in registers %edi, %esi, %edx and %ro The function returns a single argument in %eax func: movl %edi, %eax . L3: mov sla cmp1 %eax, %esi, . L2 %rdi (Xrcx,Ardi,4) addl $1, eax cmp1 %edx, %eax .L3 movl $-1 %eax .L2: ret For example: Test test(1,target1)OK1 Result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
