stack backend
Michal Moskal
malekith@pld.org.pl
Tue Dec 11 10:30:00 GMT 2001
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
More information about the Gcc
mailing list