This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]