Language-specific CPUs was Re: uIEC/SD == AWESOME!
der Mouse
mouse at Rodents-Montreal.ORG
Fri Jan 2 02:25:32 CST 2009
> Since SP is in I/O space and not register space, it takes extra
> instructions to perform stack-relative addressing (got to get SP into
> X, Y, or Z) for stack-local variables, etc.
Nothing says that the hardware's stack has to be the same as the C
local-variable stack, and indeed on an architecture like that it might
be smarter to use the hardware's stack - the thing SP points to - only
for return addresses, with local variables and arguments kept on a
separate stack, maintained by the function call/return boilerplate.
Of course, that means you have to keep the data stack pointer
somewhere, since you can't keep it in SP for free....
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
More information about the cctech
mailing list