On Wed, May 23, 2001 at 10:30:32AM -0700, Hong Zhang wrote:
> I think "stack based =~ register based". If we don't have Java-like "jsr" 

That comment reminds me of how the register file is implemented in
a sun sparc. They have a large register file, but only some are accessable
at any given time, say 16. When you do a sub call you place your
arguments in the high registers, say 4, and shift the window pointer
by 12 (in this case).  What was r12-r15 now becomes r0-r3. On return
the result is placed into r0-r3 which are then available to the
caller as r12-r15.

This allows very efficient argument passing without having to save
registers to a stack and restor them later.

Graham.

Reply via email to