PUSHA/PUSHAD—Push All General-Purpose RegistersInstruction Operand EncodingDescriptionPushes the contents of the general-purpose registers onto the stack. The registers are stored on the stack in the following order: EAX, ECX, EDX, EBX, ESP (original value), EBP, ESI, and EDI (if the current operand-size attribute is 32) and AX, CX, DX, BX, SP (original value), BP, SI, and DI (if the operand-size attribute is 16). These instruc-tions perform the reverse operation of the POPA/POPAD instructions. The value pushed for the ESP or SP register is its value before prior to pushing the first register (see the “Operation” section below).The PUSHA (push all) and PUSHAD (push all double) mnemonics reference the same opcode. The PUSHA instruc-tion is intended for use when the operand-size attribute is 16 and the PUSHAD instruction for when the operand-size attribute is 32. Some assemblers may force the operand size to 16 when PUSHA is used and to 32 when PUSHAD is used. Others may treat these mnemonics as synonyms (PUSHA/PUSHAD) 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.In the real-address mode, if the ESP or SP register is 1, 3, or 5 when PUSHA/PUSHAD executes: an #SS exception is generated but not delivered (the stack error reported prevents #SS delivery). 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.This instruction executes as described in compatibility mode and legacy mode. It is not valid in 64-bit mode.OperationIF 64-bit Mode THEN #UDFI;IF OperandSize=32 (* PUSHAD instruction *)THENTemp := (ESP);Push(EAX);Push(ECX);Push(EDX);Push(EBX);Push(Temp);Push(EBP);Push(ESI);Push(EDI);ELSE (* OperandSize= 16, PUSHA instruction *)Temp := (SP);Push(AX);Push(CX);Push(DX);OpcodeInstructionOp/ En64-Bit ModeCompat/Leg ModeDescription60PUSHAZOInvalidValidPush AX, CX, DX, BX, original SP, BP, SI, and DI.60PUSHADZOInvalidValidPush EAX, ECX, EDX, EBX, original ESP, EBP, ESI, and EDI.Op/EnOperand 1Operand 2Operand 3Operand 4ZONANANANA
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.