Re: call stack's order of parameters



(The Motorola 68000 had LINK and UNLK instructions that set up the
frame pointer upon call and did the reverse exchange upon return.
I do *not* know if the x86 architecture has this type of instruction.)

It does, ENTER and LEAVE. GCC generates only LEAVE, presumably because it's faster doing the ENTER by hand, like with many instructions in the x86 instruction set.


Bjarni
--

INFORMATION WANTS TO BE FREE

.



Relevant Pages

  • Re: The longest instruction
    ... The x86 architecture allows a maximum of 15 bytes, ... prefixes you stack onto the instruction. ... Randy Hyde ... Prev by Date: ...
    (comp.lang.asm.x86)
  • Re: The Stack (Need Some Clarification)
    ... A classical approach for referencing function arguments and local variables inside a function is the use of a so-called frame pointer. ... the EBP register is customarily used as a frame pointer. ... The LEAVE instruction is a single-byte ...
    (comp.lang.asm.x86)