This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC
- To: mrs at windriver dot com (mike stump)
- Subject: Re: GCC
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Thu, 20 Sep 2001 00:30:57 +0100 (BST)
- Cc: thomascanny at yahoo dot co dot nz, gcc at gcc dot gnu dot org
> Isn't this inconsequential? One can always dummy up a stack trough
> convention, just as one dummies up more registers through convention.
Mostly true. But you'd have to go to a full interpreter if the native
machine code doesn't allow reading / writing of the program counter.
The 8008 comes to mind. Well, I suppose you can manage with appropriate
relocations, by having the caller site load the return address as immediate
data and putting it into your software stack, and having the callee use
self-modifyig code to return.
> In fact, don't most risc cpu do exactly this anyway? [ thumbing
> through my mips book ] I don't see any mention of a stack anywhere in
> my mips book. Doesn't seem to be a problem in the least.
Well, but surely ease of implementation of a stack (in RAM) was a design
criterion for the architecture.