Pop syntax, Description, Operation – Intel Extensible Firmware Interface User Manual
Page 825: Behaviors and restrictions

EFI Byte Code Virtual Machine
Version 1.10
12/01/02
19-51
POP
SYNTAX:
POP[32|64] {@}R
1
{Index16|Immed16}
DESCRIPTION:
This instruction pops a 32-bit (POP32) or 64-bit (POP64) value from the stack, stores the result to
Operand 1, and adjusts the stack pointer R0 accordingly.
OPERATION:
Operand 1 <= [R0]
R0 <= R0 + 4 (POP32)
R0 <= R0 + 8 (POP64)
Table 19-37. POP Instruction Encoding
BYTE DESCRIPTION
Bit Description
7
0 = Immediate/index absent
1 = Immediate/index present
6
0 = 32-bit operation
1 = 64-bit operation
0
0..5
Opcode = 0x2C
Bit Description
7..4
Reserved = 0
3
0 = Operand 1 direct
1 = Operand 1 indirect
1
0..2 Operand
1
2..3
Optional 16-bit immediate data/index
BEHAVIORS AND RESTRICTIONS:
• If Operand 1 is direct, and an index/immediate data is specified, then the immediate data is read
as a signed value and is added to the value popped from the stack, and the result stored to the
Operand 1 register.
• If Operand 1 is indirect, then the immediate data is interpreted as an index, and the value
popped from the stack is stored to address [R
1
+ Index16].
• If the instruction is POP32, and Operand 1 is direct, then the popped value is sign-extended to
64 bits before storing to the Operand 1 register.