![]() ![]() Operation IF (PE = 0) or (PE = 1 and ((VM = 0) or (VM = 1 and IOPL = 3))) Next, the processor generates a #DF exception and enters a shutdown state as described in the #DF discussion in Chapter 6 of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A. In the real-address mode, if the ESP or SP register is 1 when PUSHF/PUSHFD instruction executes: an #SS exception is generated but not delivered (the stack error reported prevents #SS delivery). When in virtual-8086 mode and the I/O privilege level (IOPL) is less than 3, the PUSHF/PUSHFD instruction causes a general protection exception (#GP). When copying RFLAGS to the stack, the VM and RF flags (bits 16 and 17) are not copied instead, values for these flags are cleared in the RFLAGS image stored on the stack. 32-bit operand size cannot be encoded in this mode. 16-bit operation is supported using the operand size override prefix 66H. In 64-bit mode, the instruction’s default operation is to decrement the stack pointer (RSP) by 8 and pushes RFLAGS on the stack. Others may treat these mnemonics as synonyms (PUSHF/PUSHFD) and use the current setting of the operand-size attribute to determine the size of values to be pushed from the stack, regardless of the mnemonic used. Some assemblers may force the operand size to 16 when PUSHF is used and to 32 when PUSHFD is used. The PUSHF instruction is intended for use when the operand-size attribute is 16 and the PUSHFD instruction for when the operand-size attribute is 32. The PUSHF (push flags) and PUSHFD (push flags double) mnemonics reference the same opcode. See Chapter 3 of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, for more information about the EFLAGS register. ![]() When copying the entire EFLAGS register to the stack, the VM and RF flags (bits 16 and 17) are not copied instead, the values for these flags are cleared in the EFLAGS image stored on the stack. These instructions reverse the operation of the POPF/POPFD instructions. ![]() PUSHF/PUSHFD-Push EFLAGS Register onto the Stack PUSHF/PUSHFD-Push EFLAGS Register onto the Stack Opcode*ĭecrements the stack pointer by 4 (if the current operand-size attribute is 32) and pushes the entire contents of the EFLAGS register onto the stack, or decrements the stack pointer by 2 (if the operand-size attribute is 16) and pushes the lower 16 bits of the EFLAGS register (that is, the FLAGS register) onto the stack. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |