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, %eax and %rcx. The function returns a single argument in %eax func: movi %edi, %eax L3 : mov sq cmp! je addl %eax, %esi, %rdi (%rcx , %rdi,4) L2 $1, %eax j1 movl -1, eax L3 ret For example Test Result test (1,target1) oK1 Answer: (penalty regime: 10, 20, 96) 1 long func (long a,long b,long c, long long d)f long x-a; return x 7 8while(x

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!