Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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, %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
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