Question: Function funct2 has the following prototype: double funct2(double w, int x, float y, long z); Gcc generates the following code for the function: 1 23
Function funct2 has the following prototype:
double funct2(double w, int x, float y, long z);
Gcc generates the following code for the function:

1 23 4 5 6 7 8 9 double funct2(double w, int x, float y, long z) w in %xmm0, x in %edi, y in %xmmi, z in %rsi funct2: vcvtsi2ss vmulss %xmm1, %xmm2, %xmm1 %edi, %xmm2, %xmm2 vunpcklps vcvtps2pd vcvtsi2sdq %xmm1, %xmm1, %xmm1 %xmm1, %xmm2 %rsi, %xmm1, %xmm1 vdivsd %xmm1, %xmm0, %xmmo vsubsd %xmm0, %xmm2, %xmmo ret Write a C version of funct2.
Step by Step Solution
3.28 Rating (151 Votes )
There are 3 Steps involved in it
This problem can readily be solved by stepping through the a... View full answer
Get step-by-step solutions from verified subject matter experts
