EasyManuals Logo

Intel ARCHITECTURE IA-32 User Manual

Intel ARCHITECTURE IA-32
568 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #243 background imageLoading...
Page #243 background image
Optimizing for SIMD Integer Applications 4
4-23
Building Blocks
This section describes instructions and algorithms which implement
common code building blocks efficiently.
Absolute Difference of Unsigned Numbers
Example 4-16 computes the absolute difference of two unsigned
numbers. It assumes an unsigned packed-byte data type. Here, we make
use of the subtract instruction with unsigned saturation. This instruction
receives
UNSIGNED operands and subtracts them with UNSIGNED
saturation. This support exists only for packed bytes and packed words,
not for packed doublewords.
This example will not work if the operands are signed.
Note that the
psadbw instruction may also be used in some situations;
see section “Packed Sum of Absolute Differences” for details.
Example 4-16 Absolute Difference of Two Unsigned Numbers
; Input:
; MM0 source operand
; MM1 source operand
; Output:
; MM0 absolute difference of the unsigned
; operands
movq MM2, MM0 ; make a copy of MM0
psubusb MM0, MM1 ; compute difference one way
psubusb MM1, MM2 ; compute difference the other way
por MM0, MM1 ; OR them together

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel ARCHITECTURE IA-32 and is the answer not in the manual?

Intel ARCHITECTURE IA-32 Specifications

General IconGeneral
Instruction Setx86
Instruction Set TypeCISC
Memory SegmentationSupported
Operating ModesReal mode, Protected mode, Virtual 8086 mode
Max Physical Address Size36 bits (with PAE)
Max Virtual Address Size32 bits
ArchitectureIA-32 (Intel Architecture 32-bit)
Addressable Memory4 GB (with Physical Address Extension up to 64 GB)
Floating Point Registers8 x 80-bit
MMX Registers8 x 64-bit
SSE Registers8 x 128-bit
RegistersGeneral-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP), Segment registers (CS, DS, SS, ES, FS, GS), Instruction pointer (EIP), Flags register (EFLAGS)
Floating Point UnitYes (x87)

Related product manuals