tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Generating asm rather than machine code...


From: Ben Hinkle
Subject: Re: [Tinycc-devel] Generating asm rather than machine code...
Date: Sat, 17 Dec 2005 17:31:25 -0500

You might want to look into vtop->sym for the symbol names. I believe the stack offset of local variables is stored in vtop->c.ul, for example. Also the following global variables may help:
/* loc : local variable index
   ind : output code index
   rsym: return symbol
   anon_sym: anonymous symbol index
*/
static int rsym, anon_sym, ind, loc;

 
On 12/17/05, Kim Lux <address@hidden> wrote:

We'd like our TinyC compiler to generate asm rather than machine code.

About the only change I think we need to make are that we need symbolic
addresses to be passed to the backend rather than absolute addresses.

For example, when doing a jump, we need to 'jump _funcA'  rather than
'jump 0x3456'  Likewise with vars, we need to store i12  rather than
store 0x123.

Is it OK to look at the top.type.t info for this and use it ?

And we need to know where and when they are declared.  I think the elf
info should help there.

For local function vars, we'll want them allocated on the stack.  In
that case we will need StackFrame +x type addresses.

Comments ?  Ideas ?

--
Kim Lux,  Diesel Research Inc.




_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]