tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] forward asm symbols vs static


From: Michael Matz
Subject: Re: [Tinycc-devel] forward asm symbols vs static
Date: Wed, 22 Nov 2017 18:10:59 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Mon, 20 Nov 2017, Michael Matz wrote:

> > naively I'd think that it probably should more closely emulate the gcc 
> > situation where inline asm ends up just as embedded snippets in its C -> 
> > asm output.  Which could mean for example that "free_asm_labels" should 
> > be called only once at the end of each "translation unit" (file).
> 
> Yes, that would be the ultimate goal.  As said, this would elevate the 
> problem of sharing C-label and asm-label namespace, which already is a 
> problem right now, even more.  So that needs solving, preferably without 
> needing too much additional memory, then the move to a single end-of-file 
> free_asm_labels, and then all is sunny :)
> 
> > Below is some test that I just have tried.
> 
> Yep, a conscise example of all asm- symbol table problems we have right 
> now :)

I've fixed the problems I know about, including this two-file testcase 
(I've added it to the testsuite, I hope it also works on win32 and win64, 
which I haven't tested).

After release I'm probably going to change how the asm symtable is 
implemented, which then does away with the new slot in TokenSym.  My idea 
is to have just a single sym table for global decls, the C one, which can 
be used for the asm one as well, with some slight adjustments.

But as is, it at least fixes the testcase, the linux-2.4.x 32bit kernel, 
and 64bit linux 4.6, so I'm happy enough for now :)


Ciao,
Michael.



reply via email to

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