Question: Write a C function for the following assembly. cvtsd2ss converts scalar double precision number (a double number) to scalar single precision (a flo converts scalar


Write a C function for the following assembly. cvtsd2ss converts scalar double precision number (a double number) to scalar single precision (a flo converts scalar single precision number (a float number) to scalar double precision (a double number) unknown1 ret unknown2: %xmm1,2xmm@ subsd ret unknown3: mov aps %xmm0, cvtsd2s:s addss %xmm0, cvtss2sd movsd %xmm2, ret %xmm1 (%rdi), %xmme %xmm1 %xmm1, %xmm2 (Xrdi) 4 unknown4: movsd mov apd (%rdi), %xmm1 %xmm1, %xmm2 movapd ret %xmm1, %xmm0 unknown5 movl $e, %eax L13 . L14: mulss (%rsi,%rax , 4), %xmm1 addq $1, %rax . L13: cmpq %rdi, %rax jb rep ret L14 Write a C function for the following assembly. cvtsd2ss converts scalar double precision number (a double number) to scalar single precision (a flo converts scalar single precision number (a float number) to scalar double precision (a double number) unknown1 ret unknown2: %xmm1,2xmm@ subsd ret unknown3: mov aps %xmm0, cvtsd2s:s addss %xmm0, cvtss2sd movsd %xmm2, ret %xmm1 (%rdi), %xmme %xmm1 %xmm1, %xmm2 (Xrdi) 4 unknown4: movsd mov apd (%rdi), %xmm1 %xmm1, %xmm2 movapd ret %xmm1, %xmm0 unknown5 movl $e, %eax L13 . L14: mulss (%rsi,%rax , 4), %xmm1 addq $1, %rax . L13: cmpq %rdi, %rax jb rep ret L14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
