天天看點

Cyrix EMMX Instructions

Cyrix EMMX Instructions — Overview

In 1997, Cyrix extended Intel's MMX Instruction set with their own variation, called EMMX. This extension introduced

Implied Destination

registers, allowing some instructions to store results in a register that was not one of the source registers. This saves you a reload when you'll be performing a number of different operations on the same inputs, because by default all MMX instructions destroy the contents of one of their registers by overwriting it with the output.

EMMX Added 12 new instructions. Some of the functionality of these instructions later made its way into later SIMD instruction sets, but none of them carried on Implied Destinations.

EMMX — Implied Registers

EMMX Instructions make use of

Implied Destination

Registers. These destinations are based on the source registers. Here's a list of the registers, and their implied destinations.

mm0

-

mm1

mm1

-

mm0

mm2

-

mm3

mm3

-

mm2

mm4

-

mm5

mm5

-

mm4

mm6

-

mm7

mm7

-

mm6

If both a register and its implied destination are used, one of them will be overwritten just like a normal MMX instruction.

EMMX Instructions — OpCode List

(descriptions are skimpy, need to flesh out).

paddsiw

- Packed Add with Saturation.

psubsiw

- Packed Subtract with Saturation.

paveb

- Packed Average.

pdistib

- Packed Distance and Accumulate.

pmachriw

- Packed Multiply and Accumulate with Rounding.

pmagw

- Packed Magnitude.

pmulhrw

- Packed Multiply High with Rounding.

pmulhriw

- Packed Multiply High with Rounding using implied destination.

pmvzb

- Packed Conditional Move (zero).

pmvnzb

- Packed Conditional Move (not zero).

pmvlzb

- Packed Conditional Move (less than zero).

pmvgezb

- Packed Conditional Move (greater than or equal to zero).