13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24594 Rev. 3.10 February 2005 AMD64 TechnologyPOPFxPOPFDPOPFQPOP to rFLAGSPops a word, doubleword, or quadword from the stack into the rfLAGS register <strong>and</strong>then increments the stack pointer by 2, 4, or 8, depending on the oper<strong>and</strong> size.In protected or real mode, all the non-reserved flags in the rFLAGS register can bemodified, except the VIP, VIF, <strong>and</strong> VM flags, which are unchanged. In protected mode,at a privilege level greater than 0 the IOPL is also unchanged. The instruction altersthe interrupt flag (IF) only when the CPL is less than or equal to the IOPL.In virtual-8086 mode, if IOPL field is less than 3, attempting to execute a POPFx orPUSHFx instruction while VME is not enabled, or the oper<strong>and</strong> size is not 16-bit,generates a #GP exception.In 64-bit mode, this instruction defaults to a 64-bit oper<strong>and</strong> size; there is no prefixavailable to encode a 32-bit oper<strong>and</strong> size.Mnemonic Opcode DescriptionPOPF 9D Pop a word from the stack into the FLAGS register.POPFDAction// See “Pseudocode Definitions” on page 49.POPF_START:IF (REAL_MODE)POPF_REALELSIF (PROTECTED_MODE)POPF_PROTECTEDELSE // (VIRTUAL_MODE)POPF_VIRTUAL9DPop a double word from the stack into the EFLAGS register. (Noprefix for encoding this in 64-bit mode.)POPFQ 9D Pop a quadword from the stack to the RFLAGS register.POPF_REAL:POP.v temp_RFLAGSPOPFx 227

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!