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 #246 background imageLoading...
Page #246 background image
IA-32 Intel® Architecture Optimization
4-26
Clipping to an Arbitrary Range [high, low]
This section explains how to clip a values to a range [high, low].
Specifically, if the value is less than
low or greater than high, then clip
to
low or high, respectively. This technique uses the packed-add and
packed-subtract instructions with saturation (signed or unsigned), which
means that this technique can only be used on packed-byte and
packed-word data types.
The examples in this section use the constants
packed_max and
packed_min and show operations on word values. For simplicity we use
the following constants (corresponding constants are used in case the
operation is done on byte values):
packed_max equals 0x7fff7fff7fff7fff
packed_min equals 0x8000800080008000
packed_low contains the value low in all four words of the
packed-words data type
packed_high contains the value high in all four words of the
packed-words data type
packed_usmax all values equal 1
high_us adds the high value to all data elements (4 words) of
packed_min
low_us adds the low value to all data elements (4 words) of
packed_min
CAUTION. The absolute value of the most negative
number (that is, 8000 hex for 16-bit) cannot be
represented using positive numbers. This algorithm
will return the original value for the absolute value
(8000 hex).

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