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

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

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!