This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: stack backend
- From: Michal Moskal <malekith at pld dot org dot pl>
- To: andreasw at cs dot tu-berlin dot de, gcc at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 18:27:35 +0100
- Subject: Re: stack backend
On Tue, Dec 11, 2001 at 05:21:24PM +0100, Gonzo wrote:
> is there a simple stack backend available for gcc?
> ( some kind of my-first-compiler-outputs-that-sort-of-stuff.)
>
> for a c function
>
> int bla( int i, int j)
> {
> return( i + j );
> }
>
> i want to have sth like:
>
> popint i
> popint j
> bla
> pushint
AFAIK the only gcc back end that is stack based is JVM, and it does
not use the ordinary GCC target configuration stuff nor RTL.
RTLs are simply too much related to registers (even the name... :)
So you probably won't get simple stack-based back end to work with
reasonable effort. I would suggest writing simple compiler, instead
of messing with GCC.
--
: Michal ``,/\/\, '' Moskal | | : GCS {C,UL}++++$
: | |alekith @ |)|(| . org . pl : {E--, W, w-,M}-
: Linux: We are dot in .ORG. | : {b,e>+}++ !tv h
: CurProj: ftp://ftp.pld.org.pl/people/malekith/ksi : PLD Team member