Instruction
MOVDQ2Q
Copies the low quadword of an XMM register to an MMX register.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
MOVDQ2Q (F2 0F D6, SSE2) copies the low quadword of an XMM register into
an MMX register; the upper quadword is ignored. Both operands are
registers: there is no memory form, and MOVQ stores
either kind of register. MOVQ2DQ goes the other way.
Writing the MMX register switches the x87 unit to MMX use, TOP to 0 and
every register valid, and sets bits 79:64 of the x87 register behind it
to ones, as MOVD’s page describes; x87 code afterwards
needs EMMS. On Zen 5, movdq2q mm3, xmm0 left the x87
register behind MM3 holding FFFFh in bits 79:64 above XMM0’s low
quadword.
In compiled code
The intrinsic is _mm_movepi64_pi64. In 64-bit code, GCC 14 and
Clang 23 at -O2 keep __m64 values in XMM registers, so the intrinsic
compiles to nothing at all, and _mm_shuffle_pi16 to
PSHUFLW rather than PSHUFW. With
-m32 -msse2 GCC does use MMX registers, but it moves the quadword
through memory, a MOVQ store of the XMM register and a MOVQ load into
the MMX one, rather than with MOVDQ2Q; Clang uses no MMX register for
these intrinsics there either.
AMD’s Zen 5 guide lists MOVDQ2Q as one macro-op on any of the four FP pipes, and MOVQ2DQ as two.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
MOVDQ2Q mm, xmm
MOVDQ2Q_MMXq_XMMq | F2 0F D6 /r | SSE2 |
Latency and throughput
| Model | mm, xmm |
|---|---|
| Sandy Bridge | 2 / 1p015 |
| Haswell, Broadwell | 2 / 0.67p015 |
| Skylake, Skylake-SP, Ice Lake | 2 / 1p05 |
| Alder Lake, Sapphire Rapids | 3 / 0.67p015 |
| Lunar Lake | 3 / 0.5V0 V1 V2 V3 |
| Bonnell | 1 / 0.5p01 |
| Silvermont | 1 / 0.5FPC0 FPC1 |
| Piledriver | 1 / 1FPMAL FPU0 FPU1 |
| Zen, Zen 2 | 1 / 0.25FPU0 FPU1 FPU2 FPU3 |
| Zen 3, Zen 4 | 0 / 0.17 |
| Jaguar | 1 / 0.5FPU0 FPU1 VALU0 VALU1 |
Data flow
Where the elements of the sources go, element 0 on the right; results that depend on a control value are drawn for an example. How to read.
mm1 receives quadword 0 of xmm2: a0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
mm1.write(xmm2.q[0])
# x87: TOP = 0, all tags valid, bits 79:64 of mm1's register all onesRun on AMD Zen 5 (EPYC 9645): 1 case.
Operands
| Operand | Kind | Action |
|---|---|---|
MOVDQ2Q mm, xmm | ||
mm | explicit | write |
xmm | explicit | read |
Flags
None: XED records no flag that the forms test or change.
Attributes
What else XED records about the forms. How to read.
- All forms
- may abort a TSX transaction
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors |
|---|---|---|
SSE2 | SSE2 | Every x86-64 processor in XED’s model and Zen 3 to Zen 6 |
More SSE2 instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - LLVM 23.1.2's x86 scheduling models (commit
85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-58 (MOVDQ2Q)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.