Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size
Home SIMD MMX Data Transfer

MMX Data Transfer


When stored in memory the bytes, words, and doublewords in the packed data types are stored in consecutive addresses, with the least significant byte, word, or doubleword being stored in the lowest address and the more significant bytes, words, or doubleword being stored at consecutively higher addresses. The ordering of bytes, words, or doublewords in memory is always little endian: the bytes with the lower addresses are less significant than the bytes with the higher addresses.


MOVD mm, r/m32
MOVD r/m32, mm

The MOVD (Move 32 Bits) instruction copies 32 bits from the source operand to the destination operand.  The destination and source operands can be either MMX registers, 32-bit memory operands, or 32-bit integer registers. MOVD cannot transfer data from an MMX register to an MMX register, from memory to memory, or from an integer register to an integer register. 
When the destination operand is an MMX register, the 32-bit source operand is written to the low-order 32 bits of the 64-bit destination register, and the high-order 32 bits of the destination register are filled with zeros. When the source operand is an MMX register, the low-order 32 bits of the MMX register are written to the 32-bit integer register or 32-bit memory location.

MOVD instruction when destination operand is MMX register:
DEST[31-0] ← SRC;
DEST[63-32] ← 00000000H;

MOVD instruction when source operand is MMX register:
DEST ← SRC[31-0];
MOVD __m64 _mm_cvtsi32_si64 (int i )
MOVD int _mm_cvtsi64_si32 ( __m64m )


MOVQ mm, mm/m64
MOVQ mm/m64, mm

The MOVQ (Move 64 Bits) instruction copies 64 bits from the source operand to the destination operand. The destination and source operands can be either MMX registers or 64-bit memory operands, but MOVQ cannot transfer data from memory to memory.

MOVQ instruction when operating on MMX registers and memory locations:

Latest Articles

Easily upload videos of security cameras to YouTube
In this example, we will import video from a Yi security camera into YouTube. The same process, with eventual adjustment to the naming of directories in the SD card used by the camera to record videos, will also apply to other
A software to stand out 27 January 2018, 14.35 Web
A software to stand out
Standing out of the pack starts by being visible, and being noticed by the right group of professionals. No matter how good your profile is, it is lost in a sea of similar profiles, so you need to show up and start attracting
Web page scraping, the easy way 07 January 2018, 00.46 Web
Web page scraping, the easy way
There are many ways to extract data elements from web pages, almost all of them prettier and cooler than the method proposed here, but as we are in an hurry, let's get that data quickly, ok? Suppose we have to extract the
Scraping dynamic page content 06 January 2018, 23.57 Web
Scraping dynamic page content
One of the most common roadblocks when scraping the content of web sites is getting the full contents of the page, including JS-generated data elements (probably, the ones you are looking for). So, when using CEFSharp to scrape
Unit-testing file I/O 26 November 2017, 12.09 Testing
Unit-testing file I/O
Two good news: file I/O is unit-testable, and it is surprisingly easy to do. Let's see how it works! A software no-one asked for First, we need a piece of software that deals with files and that has to be unit-tested. The