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: avih
Subject: Re: [Tinycc-devel] forward asm symbols vs static
Date: Fri, 24 Nov 2017 20:47:17 +0000 (UTC)

I noticed a change at e7c71e24 ("tccasm: synch C and asm symtab tighter") which I'm not sure is expected.

On Windows, when I build tcc using tcc with one source, a file "tcc.def" is created at the same dir as the resulting tcc.exe, with this content:

LIBRARY tcc.exe

EXPORTS
___try__
__chkstk
__try__
_exception_code
_exception_info

To reproduce: prepare a working version of tcc for windows (this example is with tcc 32), clone tcc, cd to its root dir, and execute:

echo '#define TCC_VERSION "0.9.27"' > config.h && path/to/tcc.exe -DTCC_TARGET_PE -DTCC_TARGET_I386 -Iwin32 -I. -DONE_SOURCE -o tcc.exe tcc.c

And the result is that tcc.def is created alongside tcc.exe .
This started happening at e7c71e24 . The earlier commit ("Adjust testcase for PIE compilers") doesn't create tcc.def with the same invocation.

Is it expected? a bug?


On Thursday, November 23, 2017 11:43 PM, avih <address@hidden> wrote:


I can confirm that with this version of the file the asm test (and all other tests) pass both with tcc32 and tcc64, regardless if it was built with gcc or tcc, and regardless of build/test procedure.


On Thursday, November 23, 2017 10:17 PM, grischka <address@hidden> wrote:


avih wrote:
> - tcc 64 fails the asm tests (again, all versions regardless of how it was built).

Different calling convention on win64.  I'd suggest the attached
version which is more platform neutral.

-- gr


>    On Thursday, November 23, 2017 8:17 PM, grischka <address@hidden> wrote:

>
>  I've seen a segfault under some other circumstances on linux 64.
>
> Using "lea str(%rip),%rdi" instead of "mov $str,%rdi" in asm-c-connect-1.c
> did fix it.  (I can't tell right now whether that is expected behavior or
> points to a bug though.)
>
> Also I noticed that apparently 'U' is a string prefix in newer gcc versions.
> (Don't know, maybe for unicode?).
>
> Btw, what about the "vide" hack on tccasm.c:1020 from commit 6afe668ec
> Can we delete it?
>
> Ciao,
>
> --- grischka
>






reply via email to

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