tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Proposal for a global register feature


From: Rick C. Hodgin
Subject: Re: [Tinycc-devel] Proposal for a global register feature
Date: Tue, 13 Dec 2011 14:28:10 -0500

What part of the x86 state are you trying to capture?  There's the FPU
state, MMX, SSE and more, along with and CPU state itself (not typically
visible to application-level software, but available as a task state
segment).  Additionally, EBP is a register, not an assembly mnemonic,
and typically points to the top of local variables (though it doesn't
have to).

Are you looking to capture the state of the local variables?  If so,
that can be done several different ways, one by defining all local
variables used in a function in a structure, and then referencing and
copying the structure using traditional C functions only.

TCC generates code for several CPUs.  Supporting something like GCC's
asm("...") syntax is non-trial to say the least. :-)

- Rick

On Tue, 2011-12-13 at 20:13 +0100, etche wrote:
> Hi,
> 
> Do you think it would be possible to include this feature in TCC ?
> 
> typedef struct CPUX86State {
> char *xx;  int  v1;  int  v2;
> } CPUX86State;
> 
> register struct CPUX86State env asm("ebp")
> 
> Only GCC allows this syntax where, obviously, registers are directely 
> generated and manipulated in assembly code.
> 
> In fact I have the project to compile QEMU with TCC and this point is 
> the last blocking point (I hope).
> 
> Best regards
> 
> José Etcheverria
> 
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel





reply via email to

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