I would like to move a 2 64 bit integer in parallel from memory to an xmm register to perform operations on them(add the same constant to each of them). I looked at multiple instructions in the intel reference manual such as movupd and movdqa but they all seem to convert the integer to a floating point. Any guidance is much appreciated.
Asked
Active
Viewed 71 times
0
-
The linked-to answer seems to answer your question, but [here](https://godbolt.org/z/ZXxGBc) is an example of using `movdqu`. – Thomas Jager Jul 07 '20 at 16:02
-
2`movupd` and `movdq` do not convert anything. They are typed as being for floating point numbers, but it's just a data move at the end of the day. – fuz Jul 07 '20 at 16:11
-
If you move them to different XMM registers, the two operations are probably executed (close to) parallel on different execution ports of the CPU. – zx485 Jul 07 '20 at 16:45
-
3Your question title asks about 64-bit *register*, but your question body asks about memory. GP->XMM with `movq xmm0, rax`. MMX->XMM with `movq2dq xmm0, mm0`. Read Agner Fog's asm guide chapter on SIMD (https://agner.org/optimize/) for a table of data-movement instructions. – Peter Cordes Jul 07 '20 at 19:24