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

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

Advertisement

POP—Pop a Value from the Stack
Opcode
8F /0
8F /0
58+ rw
58+ rd
1F
07
17
0F A1
0F A9
Description
Loads the value from the top of the procedure stack to the location specified with the
destination operand and then increments the stack pointer. The destination operand
can be a general-purpose register, memory location, or segment register.
The current address-size attribute for the stack segment and the operand-size attribute
determine the amount the stack pointer is incremented (see the "Operation" below).
For example, if 32-bit addressing and operands are being used, the ESP register (stack
pointer) is incremented by 4 and, if 16-bit addressing and operands are being used, the
SP register (stack pointer for 16-bit addressing) is incremented by 2. The B flag in the
stack segment's segment descriptor determines the stack's address-size attribute.
If the destination operand is one of the segment registers DS, ES, FS, GS, or SS, the
value loaded into the register must be a valid segment selector. In protected mode,
popping a segment selector into a segment register automatically causes the descriptor
information associated with that segment selector to be loaded into the hidden
(shadow) part of the segment register and causes the selector and the descriptor
information to be validated (see the "Operation" below).
A null value (0000-0003) may be popped into the DS, ES, FS, or GS register without
causing a general protection fault. However, any subsequent attempt to reference a
segment whose corresponding segment register is loaded with a null value causes a
general protection exception (#GP). In this situation, no memory reference occurs and
the saved value of the segment register is null.
The POP instruction cannot pop a value into the CS register. To load the CS register, use
the RET instruction.
A POP SS instruction inhibits all external interrupts, including the NMI interrupt, and
traps until after execution of the next instruction. in the IA-32 System Environment.
For the Itanium System Environment, POP SS results in an
IA-32_Intercept(SystemFlag) trap after the instruction completes.This
operation allows a stack pointer to be loaded into the ESP register with the next
instruction (MOV ESP, stack-pointer value) before an interrupt occurs. The LSS
instruction offers a more efficient method of loading the SS and ESP registers.
Volume 4: Base IA-32 Instruction Reference
Instruction
Description
POP m16
Pop top of stack into m16 ; increment stack pointer
POP m32
Pop top of stack into m32 ; increment stack pointer
POP r16
Pop top of stack into r16 ; increment stack pointer
POP r32
Pop top of stack into r32 ; increment stack pointer
POP DS
Pop top of stack into DS; increment stack pointer
POP ES
Pop top of stack into ES; increment stack pointer
POP SS
Pop top of stack into SS; increment stack pointer
POP FS
Pop top of stack into FS; increment stack pointer
POP GS
Pop top of stack into GS; increment stack pointer
4:311

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents