Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1335

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

BOUND—Check Array Index Against Bounds
Opcode
62 / r
62 / r
Description
Determines if the first operand (array index) is within the bounds of an array specified
the second operand (bounds operand). The array index is a signed integer located in a
register. The bounds operand is a memory location that points to a pair of signed
doubleword-integers (when the operand-size attribute is 32) or a pair of signed
word-integers (when the operand-size attribute is 16). The first doubleword (or word)
is the lower bound of the array and the second doubleword (or word) is the upper
bound of the array. The array index must be greater than or equal to the lower bound
and less than or equal to the upper bound plus the operand size in bytes. If the index is
not within bounds, a BOUND range exceeded exception (#BR) is signaled. (When a this
exception is generated, the saved return instruction pointer points to the BOUND
instruction.)
The bounds limit data structure (two words or doublewords containing the lower and
upper limits of the array) is usually placed just before the array itself, making the limits
addressable via a constant offset from the beginning of the array. Because the address
of the array already will be present in a register, this practice avoids extra bus cycles to
obtain the effective address of the array bounds.
Operation
IF (ArrayIndex < LowerBound OR ArrayIndex > (UppderBound + OperandSize/8]))
(* Below lower bound or above upper bound *)
THEN
#BR;
FI;
Flags Affected
None.
Additional Itanium System Environment Exceptions
Itanium Reg Faults NaT Register Consumption Abort.
Itanium Mem FaultsVHPT Data Fault, Nested TLB Fault, Data TLB Fault, Alternate Data
Volume 4: Base IA-32 Instruction Reference
Instruction
BOUND r16,m16&16
BOUND r32,m32&32
TLB Fault, Data Page Not Present Fault, Data NaT Page Consumption
Abort, Data Key Miss Fault, Data Key Permission Fault, Data Access
Rights Fault, Data Access Bit Fault, Data Dirty Bit Fault
Description
Check if r16 (array index) is within bounds specified by m16&16
Check if r32 (array index) is within bounds specified by m16&16
4:33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents