4:384
Volume 4: Base IA-32 Instruction Reference
VERR, VERW—Verify a Segment for Reading or Writing
Description
Verifies whether the code or data segment specified with the source operand is
readable (VERR) or writable (VERW) from the current privilege level (CPL). The source
operand is a 16-bit register or a memory location that contains the segment selector for
the segment to be verified. If the segment is accessible and readable (VERR) or
writable (VERW), the ZF flag is set; otherwise, the ZF flag is cleared. Code segments
are never verified as writable. This check cannot be performed on system segments.
To set the ZF flag, the following conditions must be met:
• The segment selector is not null.
• The selector must denote a descriptor within the bounds of the descriptor table
(GDT or LDT).
• The selector must denote the descriptor of a code or data segment (not that of a
system segment or gate).
• For the VERR instruction, the segment must be readable; the VERW instruction, the
segment must be a writable data segment.
• If the segment is not a conforming code segment, the segment’s DPL must be
greater than or equal to (have less or the same privilege as) both the CPL and the
segment selector's RPL.
The validation performed is the same as if the segment were loaded into the DS, ES,
FS, or GS register, and the indicated access (read or write) were performed. The
selector's value cannot result in a protection exception, enabling the software to
anticipate possible segment access problems.
Operation
IF SRC(Offset) > (GDTR(Limit) OR (LDTR(Limit))
THEN
ZF
0
Read segment descriptor;
IF SegmentDescriptor(DescriptorType) = 0 (* system segment *)
OR (SegmentDescriptor(Type)
conforming code segment)
AND (CPL > DPL) OR (RPL > DPL)
THEN
ZF
0
ELSE
IF ((Instruction = VERR) AND (segment = readable))
OR ((Instruction = VERW) AND (segment = writable))
THEN
ZF
1;
FI;
FI;
Opcode
Instruction
Description
0F 00 /4
VERR
r/m16
Set ZF=1 if segment specified with
r/m16
can be read
0F 00 /5
VERW
r/m16
Set ZF=1 if segment specified with
r/m16
can be written
Summary of Contents for ITANIUM ARCHITECTURE
Page 1: ......
Page 7: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 199: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Page 352: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Page 589: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Page 590: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Page 591: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 603: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...
Page 604: ......