Re: HPUX Stack Structure



On Fri, 16 Feb 2007 17:43:57 +0000, Don Morris wrote:


The ia64 is rather important.. because it lets you know why you see
things the way you do. If you look at:
http://developer.intel.com/design/itanium/manuals/iiasdmanual.htm,
you'll see that ia64 uses a Register Stack Engine (RSE) model.
Register frames (such as when you branch to a new subroutine) get
pushed onto a stack consisting solely of such frames. Memory used
within a subroutine which isn't in registers is in a different
stack (tradtional stack, Data stack, whatever you want to think of
it as).

Presumably you can now guess why you see what you're seeing. You're
printing out your stack local variables, which aren't implemented
as registers by your compiler..

Thank you very much, now I understand it. My compiler (gcc), as you say,
doesn't implement my variables as registers, so they appear on the stack.
But.. is this what compilers usually do? Wouldn't it be better to put them
in registers to take advantage of the RSE model, in the same way as
register windows are used in SPARC?

Thanks again!

--

Heriberto
.



Relevant Pages

  • Re: why this program is not crashing
    ... >> compiler would need to stack it before the call to printf. ... If the args were in registers, you'd need either a need a wierd ...
    (comp.lang.c)
  • Re: Geriatric Pentium
    ... processor scavenging spare ram cycles to back it up to ram and restore ... Let's say I had hardware for 128 registers. ... Ditto for caching the stack. ... PUSHL P+2;; take parameter #2 and push it ...
    (comp.lang.java.advocacy)
  • Re: Kernel Calling Conventions
    ... The C calling convention is touted as being more convenient, ... passing arguments within registers. ... calling convention is to use registers and not the stack. ... over the DJGPP GCC based compiler, is due to the fact that the OW ...
    (comp.lang.asm.x86)
  • Re: Kernel Calling Conventions
    ... The C calling convention is touted as being more convenient, ... passing arguments within registers. ... stack as opposed to passing them via registers? ... by the C compiler or tell the C compiler to "reoptimize" your assembly code. ...
    (comp.lang.asm.x86)
  • Re: [OT] PostLisp, a language experiment
    ... >> that a C compiler generates code to arrange the parameters where it ... > value from the user stack. ... > can be simply passed in registers. ... common for the top stack item to reside in a register, ...
    (comp.lang.lisp)