You can keep a constant in memory or in another register:
_1 dq 1.0
and
addsd xmm1,[_1]
or
movsd xmm0,[_1]
addsd xmm1,xmm0
If you are on x64, you can do this:
mov rax,1.0
movq xmm0,rax
addsd xmm1,xmm0
or use the stack if the type mismatch bothers you:
mov rax,1.0
push rax
movsd xmm0,[rsp]
pop rax
addsd xmm1,xmm0
As for the x87 code, double
s are qwords
, not dwords
.