0

I have to work with the 128 bit xmm registers.

I'm confused regarding operations such as

movsd xmm2, xmm3
movupd xmm4, xmm9
movq xmm1, xmm7
movd xmm3, xmm8
subsd xmm0, xmm4
divsd xmm9, xmm3
.... 

When looking at the documentation for these operations the only two xmm registers used are xmm0 and xmm1. Why is it not possible to do e.g. movsd xmm1, xmm4? And how can this operation be implemented?

I looked up the different definitions for the move operations but didn't fully understand when to use which - what their differences are.. So an explanation would be very welcome.

Peter Cordes
  • 286,368
  • 41
  • 520
  • 731
stht55
  • 346
  • 8
  • 2
    The numbering in Intel's manuals are placeholders, like first xmm operand, not register numbers. Look at `blendvps` for one case where XMM0 is the only choice for one operand, for the non-AVX version: https://www.felixcloutier.com/x86/blendvps. Or read the earlier chapter of vol.2 that tells you how to read the entries. – Peter Cordes May 29 '22 at 09:08

0 Answers0