Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

4-104 Vol. 2B
INSTRUCTION SET REFERENCE, N-Z
PMINUB—Minimum of Packed Unsigned Byte Integers
Description
Performs a SIMD compare of the packed unsigned byte integers in the destination
operand (first operand) and the source operand (second operand), and returns the
minimum value for each pair of byte integers to the destination operand. The source
operand can be an MMX technology register or a 64-bit memory location, or it can be
an XMM register or a 128-bit memory location. The destination operand can be an
MMX technology register or an XMM register.
In 64-bit mode, using a REX prefix in the form of REX.R permits this instruction to
access additional registers (XMM8-XMM15).
Operation
PMINUB instruction for 64-bit operands:
IF DEST[7:0] < SRC[17:0] THEN
DEST[7:0] DEST[7:0];
ELSE
DEST[7:0] SRC[7:0]; FI;
(* Repeat operation for 2nd through 7th bytes in source and destination operands *)
IF DEST[63:56] < SRC[63:56] THEN
DEST[63:56] DEST[63:56];
ELSE
DEST[63:56] SRC[63:56]; FI;
PMINUB instruction for 128-bit operands:
IF DEST[7:0] < SRC[17:0] THEN
DEST[7:0] DEST[7:0];
ELSE
DEST[7:0] SRC[7:0]; FI;
(* Repeat operation for 2nd through 15th bytes in source and destination operands *)
IF DEST[127:120] < SRC[127:120] THEN
DEST[127:120] DEST[127:120];
Opcode Instruction
64-Bit
Mode
Compat/
Leg Mode Description
0F DA /r PMINUB mm1,
mm2/m64
Valid Valid Compare unsigned byte integers
in mm2/m64 and mm1 and
returns minimum values.
66 0F DA /r PMINUB xmm1,
xmm2/m128
Valid Valid Compare unsigned byte integers
in xmm2/m128 and xmm1 and
returns minimum values.