Specifications
Intel
®
64 and IA-32 Architectures Software Developer’s Manual Documentation Changes 66
Documentation Changes
IF (VM = 1 and IOPL < 3 AND INT n)
THEN
#GP(0);
ELSE (* Protected mode, IA-32e mode, or virtual-8086 mode interrupt *)
IF (IA32_EFER.LMA
= 0)
THEN (* Protected mode, or virtual-8086 mode interrupt *)
GOTO PROTECTED-MODE;
ELSE (* IA-32e mode interrupt *)
GOTO IA-32e-MODE;
FI;
FI;
FI;
REAL-ADDRESS-MODE:
IF ((vector_number ∗ 4) + 3) is not within IDT limit
THEN #GP; FI;
IF stack not large enough for a 6-byte return information
THEN #SS; FI;
Push (EFLAGS[15:0]);
IF ← 0; (* Clear interrupt flag *)
TF ← 0; (* Clear trap flag *)
AC ← 0; (* Clear AC flag *)
Push(CS);
Push(IP);
(* No error codes are pushed *)
CS ← IDT(Descriptor (vector_number ∗ 4), selector));
EIP ← IDT(Descriptor (vector_number ∗ 4), offset)); (* 16 bit offset AND 0000FFFFH *)
END;
PROTECTED-MODE:
IF ((vector_number ∗ 8) + 7) is not within IDT limits
or selected IDT descriptor is not an interrupt-, trap-, or task-gate type
THEN #GP((vector_number ∗ 8) + 2 + EXT); FI;
(* EXT is bit 0 in error code *)
IF software interrupt (* Generated by INT n, INT 3, or INTO *)
THEN
IF gate descriptor DPL < CPL
THEN #GP((vector_number ∗ 8) + 2 ); FI;
(* PE
= 1, DPL<CPL, software interrupt *)
FI;
IF gate not present
THEN #NP((vector_number ∗ 8) + 2 + EXT); FI;
IF task gate (* Specified in the selected interrupt table descriptor *)
THEN GOTO TASK-GATE;
ELSE GOTO TRAP-OR-INTERRUPT-GATE; (* PE = 1, trap/interrupt gate *)
FI;
END;
IA-32e-MODE:
IF ((vector_number ∗ 16) + 15) is not in IDT limits
or selected IDT descriptor is not an interrupt-, or trap-gate type
THEN #GP((vector_number « 3) + 2 + EXT);
(* EXT is bit 0 in error code *)