bndmov
Move Bounds
Moves MPX bounds data.
Pseudocode Operation
// Source can be bounds register or 16 bytes of memory
IF (src is bounds register) THEN
bndN.lower ← src.lower;
bndN.upper ← src.upper;
ELSE
bndN.lower ← [src];
bndN.upper ← [src + 8];
END;
// No flags modified
Encoding
Operands
-
dest
MPX bounds register (bnd0-bnd3) -
src
Memory operand
Related
More in MPX
Reference
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 66 0F 1A /r | BNDMOV bnd1, bnd2/m64 | RM | N.E./V | MPX | Move lower and upper bound from bnd2/m64 to bound register bnd1. |
| 66 0F 1A /r | BNDMOV bnd1, bnd2/m128 | RM | V/N.E. | MPX | Move lower and upper bound from bnd2/m128 to bound register bnd1. |
| 66 0F 1B /r | BNDMOV bnd1/m64, bnd2 | MR | N.E./V | MPX | Move lower and upper bound from bnd2 to bnd1/m64. |
| 66 0F 1B /r | BNDMOV bnd1/m128, bnd2 | MR | V/N.E. | MPX | Move lower and upper bound from bnd2 to bound register bnd1/m128. |
Description
BNDMOV moves a pair of lower and upper bound values from the source operand (the second operand) to the destination (the first operand). Each operation is 128-bit move. The exceptions are same as the MOV instruction. The memory format for loading/store bounds in 64-bit mode is shown in Figure 3-5.
BNDMOV to memory in 64-bit mode Upper Bound (UB) Lower Bound (LB)
16 8 0 Byte offset
BNDMOV to memory in 32-bit mode Upper Bound (UB) Lower Bound (LB)
16 8 4 0 Byte offset
This instruction does not change flags.
Operation
BNDMOV register to register DEST.LB := SRC.LB; DEST.UB := SRC.UB; BNDMOV from memory IF 64-bit mode THEN DEST.LB := LOAD_QWORD(SRC); DEST.UB := LOAD_QWORD(SRC+8); ELSE DEST.LB := LOAD_DWORD_ZERO_EXT(SRC); DEST.UB := LOAD_DWORD_ZERO_EXT(SRC+4); FI; BNDMOV to memory IF 64-bit mode THEN DEST[63:0] := SRC.LB; DEST[127:64] := SRC.UB; ELSE DEST[31:0] := SRC.LB; DEST[63:32] := SRC.UB; FI;
Intel C/C++ Compiler Intrinsic Equivalent
BNDMOV void * _bnd_copy_ptr_bounds(const void *q, const void *r)