Seemingly trivial problem in assembly: I want to copy the whole XMM0 register to XMM3. I've tried
movdq xmm3, xmm0
but MOVDQ cannot be used to move values between two XMM registers. What should I do instead?
Seemingly trivial problem in assembly: I want to copy the whole XMM0 register to XMM3. I've tried
movdq xmm3, xmm0
but MOVDQ cannot be used to move values between two XMM registers. What should I do instead?
It's movapd
, movaps
, or movdqa
movaps xmm3, xmm0
They all do the same thing, but there's a catch:
movapd
and movaps
operate in the floating-point domain.movdqa
operates in the integer domainUse the appropriate one according to your datatype to avoid domain-changing stalls.
Also, there's no reason to use movapd
. Always use movaps
instead because movapd
takes an extra byte to encode.