This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -fomit-frame-pointer interaction with alloca - egcs-1.0.1


On Mon, Feb 09, 1998 at 03:02:32AM -0700, Jeffrey A Law wrote:
> 
> So my question is what exactly does push %esp do on modern x86 machines?
> (or more correctly an x86 machine that gcc can compile code for -- 8086
> does not count :-)


My Intel Pentium Processor User's Manual section 25-230 (PUSH) says:

The PUSH ESP instruction pushes the value of the ESP register as it existed
before the instruction. This differs from the 8086, where the PUSH SP
instruction pushes the new value (decremented by 2).
Likewise, a PUSH-from-memory instruction, which uses the stack pointer (ESP)
as a base register,references memory before the PUSH. The base used is the value
of the ESP before the instruction executes.

Robert



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]