[Top][All Lists]

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

Re: [Tinycc-devel] How do the stack value types work ???

From: Ben Hinkle
Subject: Re: [Tinycc-devel] How do the stack value types work ???
Date: Sat, 17 Dec 2005 08:11:32 -0500

A brief overview can be found at http://fabrice.bellard.free.fr/tcc/tcc-doc.html#SEC32. I think basically vtop.r contains information about how the data is stored - register, lvalue, etc. These things aren't part of the type but are needed during compilation.
I think it's somewhat unfortunate that the VT_ prefix is used both for .t and .r but maybe its that way for a reason - I don't know.

On 12/16/05, Kim Lux <address@hidden> wrote:
I am a bit confused about figuring out the type of the stack items, ie
vtop[0] and vtop[-1].

vtop is type SValue.

I see we have vtop.type.t and we also have vtop.r.

In tcc.c I see a whole bunch of VT* definitions.

Are these applied to the .r field or the .type.t field ?

What is the significance of the VT_VALMASK ?

It looks to me like some info is gotten by masking r with VT_VALMASK and
then comparing with the types.  ie (vtop.r & VT_VALMASK == ???)

It also seems to me that there is type info with (vtop.type.t == ???)

Which do I use when and with witch fields ?

How does the r field store registers ?


Kim Lux,  Diesel Research Inc.

Tinycc-devel mailing list

reply via email to

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