Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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
Step: 1
Get Instant Access with AI-Powered 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