Another alternative:
; x64
;uasm64 -win64 -Zp8 -c p128.asm
.xmm
option casemap:none
option frame:auto
includelib \masm32\lib64\msvcrt.lib
printf proto :ptr, :vararg
_DOUBLESTOXMM MACRO par1, par2
Local xmmValue
.const
align 16
xmmValue REAL8 par1, par2
.code
exitm <xmmValue>
ENDM
.data
format db "Results: %.16llf, %.16llf",13,10,0
.code
main proc
;sub rsp, 8 by uasm
sub rsp, 20h
movaps xmm0, XMMWORD ptr _DOUBLESTOXMM(3.14159265358979323846264338327, -6.28318530717958647692528676654)
movq r8, xmm0 ; Note: ML64 does not accept movq, it is a know bug. But it accepts movd and converts it to movq. Weird
shufpd xmm0, xmm0, 1
movq rdx, xmm0
mov rcx, offset format
call printf
add rsp, 20h
ret
main endp
end
Results: -6.2831853071795862, 3.1415926535897931