Instruction
MOVQ2DQ
Copies an MMX register to the low quadword of an XMM register and zeroes the high quadword.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
MOVQ2DQ (F3 0F D6, SSE2) copies an MMX register into the low quadword of
an XMM register and clears bits 127:64; the legacy encoding leaves bits
128 and up alone. On Zen 5, movq2dq xmm1, mm6 put MM6’s 64 bits in the
low quadword, zeros above them, and kept the rest of ZMM1 as it was.
Both operands are registers. MOVDQ2Q goes the other
way, and Intel’s optimization manual names the pair as the moves between
the two register files (Section 6.4.15).
Although it only reads an MMX register, Intel’s manual has it switch the x87 unit to MMX use like any MMX instruction, setting TOP to 0 and every register valid; MOVD’s page explains that sharing, and why x87 code needs EMMS after it.
In compiled code
The intrinsic is _mm_movpi64_epi64. In 64-bit code, where GCC 14 and
Clang 23 keep __m64 values in XMM registers, it compiles at -O2 to
movq xmm0, xmm0, the register form of MOVQ that clears
the upper quadword. With -m32 -msse2 GCC stores the MMX register and
loads the quadword back into the XMM register, with two MOVQs, and Clang
avoids MMX registers altogether.
AMD’s Zen 5 guide lists MOVQ2DQ as two macro-ops, each on any of the four FP pipes, where MOVDQ2Q is one.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
MOVQ2DQ xmm, mm
MOVQ2DQ_XMMdq_MMXq | F3 0F D6 /r | SSE2 |
Latency and throughput
| Model | xmm, mm |
|---|---|
| Sandy Bridge, Haswell, Broadwell | 1 / 0.33p015 |
| Skylake, Skylake-SP, Ice Lake | 2 / 2p5 |
| Alder Lake, Sapphire Rapids | 3 / 1p015 |
| Lunar Lake | 3 / 0.5V0 V1 V2 V3 |
| Bonnell | 1 / 0.5p01 |
| Silvermont | 1 / 0.5FPC0 FPC1 |
| Piledriver | 4 / 0.5FPMAL FPU0 FPU1 |
| Zen, Zen 2 | 1 / 0.25FPU0 FPU1 FPU2 FPU3 |
| Zen 3, Zen 4 | 1 / 0.5FP0 FP1 FP2 FP3 FP45 |
| 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.
Result quadwords 1 to 0: 0, a0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
xmm1.write(mm2.q[0]) # bits 127:64 zeroed
# bits 128 and up of the register are unchanged
# x87: TOP = 0, all tags validRun on AMD Zen 5 (EPYC 9645): 1 case.
Operands
| Operand | Kind | Action |
|---|---|---|
MOVQ2DQ xmm, mm | ||
xmm | explicit | write |
mm | 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-102 (MOVQ2DQ)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 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.