BNDMOV: Move Bounds

For information about interpreting this page, see the help page.
Opcode and MnemonicEncoding16 bit Mode32 bit Mode64 bit ModeCPUID Feature FlagDescription
66 0F 1A /r
BNDMOV bnd1, bnd2/m64
RMValidValidNot EncodableMPXMoves a lower and upper bound from bnd2/m64 into bnd1.
66 0F 1A /r
BNDMOV bnd1, bnd2/m128
RMNot EncodableNot EncodableValidMPXMoves a lower and upper bound from bnd2/m128 into bnd1.
66 0F 1B /r
BNDMOV bnd1/m64, bnd2
MRValidValidNot EncodableMPXMoves a lower and upper bound from bnd2 into bnd1/m64.
66 0F 1B /r
BNDMOV bnd1/m128, bnd2
MRNot EncodableNot EncodableValidMPXMoves a lower and upper bound from bnd2 into bnd1/m128.

Encoding

EncodingOperand 1Operand 2
MRModRM.reg[w]ModRM.r/m[r]
RMModRM.r/m[w]ModRM.reg[r]

Description

The BNDMOV instruction moves a pair of lower and upper bounds from the source operand into the destination operand.

Which instruction form (32 or 64 bit) is used depends on the operating mode of the processor. In 16 and 32 bit mode, the 32 bit form is used (64 bits are moved), and, in 64 bit mode, the 64 bit form is used (128 bits are moved).

Operation

This pseudo-code uses C# syntax. A list of the types used is available here.
public void BNDMOV(ref Bound dest, Bound src)
{
  dest = src;
}

C Intrinsics

Exceptions

Protected Mode

#UD
If the LOCK prefix is used, but the destination is not a memory operand.
If ModRM.r/m does not encode BND0 through BND3 (i.e. contains a 4, 5, 6, or 7).
If the address size overload prefix (67h) is used when CS.D is 1.
If the address size overload prefix is not used when CS.D is 0.
#SS(0)
If the memory operand effective address is outside the SS segment limit.
#GP(0)
If the memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit.
If the destination operand points to a non-writable segment.
If the DS, ES, FS, or GS segment register contains a NULL segment selector.
#AC(0)
If alignment checking is enabled and an unaligned memory access is made while CPL is 3.
#PF(fault-code)
If a page fault occurs.

Real-Address Mode

#UD
If the LOCK prefix is used, but the destination is not a memory operand.
If ModRM.r/m does not encode BND0 through BND3 (i.e. contains a 4, 5, 6, or 7).
If 16 bit addressing is used.
#SS(0)
If the memory operand effective address is outside the SS segment limit.
#GP(0)
If the memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit.

Virtual-8086 Mode

#UD
If the LOCK prefix is used, but the destination is not a memory operand.
If ModRM.r/m does not encode BND0 through BND3 (i.e. contains a 4, 5, 6, or 7).
If 16 bit addressing is used.
#SS(0)
If the memory operand effective address is outside the SS segment limit.
#GP(0)
If the memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit.
#AC(0)
If alignment checking is enabled and an unaligned memory access is made while CPL is 3.
#PF(fault-code)
If a page fault occurs.

Compatibility Mode

Same exceptions as protected mode.

Long Mode

#UD
If the LOCK prefix is used, but the destination is not a memory operand.
If ModRM.r/m does not encode BND0 through BND3 (i.e. contains any of 4 through 15).
If the address size overload prefix (67h) is used when CS.D is 1.
If the address size overload prefix is not used when CS.D is 0.
If RIP-relative addressing is used.
#SS(0)
If the memory address referencing the SS segment is in non-canonical form.
#GP(0)
If the memory address is in non-canonical form.
#AC(0)
If alignment checking is enabled and an unaligned memory access is made while CPL is 3.
#PF(fault-code)
If a page fault occurs.