Question: Function funct3 has the following prototype: double funct3(int *ap, double b, long c, float *dp); For this function, gcc generates the following code: 1 2
Function funct3 has the following prototype:
double funct3(int *ap, double b, long c, float *dp);
For this function, gcc generates the following code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 double funct3(int *ap, double b, long c, float *dp) ap in %rdi, b in %xmmo, c in %rsi, dp in %rdx funct3: vmovss (%rdx), %xmm1 vcvtsi2sd vucomisd jbe vunpcklps vcvtps2pd ret .L8 vcvtsi2ssq vmulss %xmm1, %xmm0, %xmm1 .L8: (%rdi), %xmm2, %xmm2 %xmm2, %xmmo %rsi, %xmm0, %xmmo vunpcklps vcvtps2pd ret vaddss %xmm1, %xmm1, %xmm 1 %xmm1, %xmm1, %xmm1 %xmm1, %xmmo vcvtsi2ssq vaddss %xmm1, %xmm0, %xmmo %rsi, %xmm0, %xmmo %xmm0, %xmmo, %zmmo %xmmo, %xmmo Write a C version of funct3.
Step by Step Solution
3.28 Rating (154 Votes )
There are 3 Steps involved in it
Again we annotate the code including dealing with the con... View full answer
Get step-by-step solutions from verified subject matter experts
