Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size
Home Programming 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:
DEST ← SRC;
Quote this article on your site

To create link towards this article on your website,
copy and paste the text below in your page.




Preview :

MMX Data Transfer
Saturday, 24 April 2010

Powered by QuoteThis © 2008
 
View Stefano Tommesani's profile on LinkedIn

Latest Articles

Fixing Git pull errors in SourceTree 10 April 2017, 01.44 Software
Fixing Git pull errors in SourceTree
If you encounter the following error when pulling a repository in SourceTree: VirtualAlloc pointer is null, Win32 error 487 it is due to to the Cygwin system failing to allocate a 5 MB large chunk of memory for its heap at
Castle on the hill of crappy audio quality 19 March 2017, 01.53 Audio
Castle on the hill of crappy audio quality
As the yearly dynamic range day is close (March 31st), let's have a look at one of the biggest audio massacres of the year, Ed Sheeran's "Castle on the hill". First time I heard the song, I thought my headphones just got
Necessary evil: testing private methods 29 January 2017, 21.41 Testing
Necessary evil: testing private methods
Some might say that testing private methods should be avoided because it means not testing the contract, that is the interface implemented by the class, but the internal implementation of the class itself. Still, not all
I am right and you are wrong 28 December 2016, 14.23 Web
I am right and you are wrong
Have you ever convinced anyone that disagreed with you about a deeply held belief? Better yet, have you changed your mind lately on an important topic after discussing with someone else that did not share your point of
How Commercial Insight changes R&D 06 November 2016, 01.21 Web
How Commercial Insight changes R&D
The CEB's Commercial Insight is based on three pillars: Be credible/relevant – Demonstrate an understanding of the customer’s world, substantiating claims with real-world evidence. Be frame-breaking – Disrupt the

Translate