1 / 5

CS 301 Fall 2002 MMX Instructions

Explore Single Instruction Multiple Data (SIMD) concept within MMX programming, covering the use of packed registers for efficient data processing. Learn about MMX registers and instruction types for enhanced performance in image processing tasks.

sthurston
Download Presentation

CS 301 Fall 2002 MMX Instructions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 301 Fall 2002MMX Instructions Slide Set 12

  2. Why MMX • To do SWAR. What is SWAR? SIMD Within A Register. But what is SIMD? Single Instruction Multiple Data. • The basic idea is that you often want to do the same thing to a bunch of numbers (say, to combine two images, you add the pixel values for each pixel.) If each pixel takes one byte, wouldn’t it be nice to store four bytes in one 32-bit register, and add them all at once?

  3. SWAR • Some operations automatically work correctly on packed registers. Any bitwise operation, for instance. • Other operations like add and subtract don’t work. When adding two bytes, the carry out would shift into the next byte over, which probably isn’t what you want.

  4. MMX Registers • MMX instructions use 8 registers, MM0 through MM7. These are 64-bit registers, and are actually the same as the floating point registers ST0-ST7 (so you can’t mix floating point and MMX code). • Most MMX instructions operate on packed bytes, words, or doublewords, although some don’t have the packed byte option.

  5. References • Intel’s Reference Guide • MMX Primer • Intel’s MMX pages

More Related