tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] GCC by TCC (some fixes)


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] GCC by TCC (some fixes)
Date: Fri, 30 Sep 2005 13:59:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Hi,

Thank you for the patch and the statistics. I would have thought that the code generated by TCC was slower so it is a good surprise.

My guess is that it would be possible to come much closer to GCC and BCC in terms in the performance of the generated code and code size without slowing down TCC... I still don't know if it is worth the effort !

Fabrice.

grischka wrote:
Hi,

This patch fixes some issues discovered on the way of compiling
gcc with tcc. (gcc 2.95.3-7, that is).

Some statistics for compiling cc1.exe using -O1 (or similar) on a
P2-266. Time(2) is the time when using the result to compile
itself, the ouputs from that are identical.

Compiler      time        ~mem-use    size of cc1.exe     time(2)
--------------------------------------------------------------------
GCC 2.95.3    560 sec     22 MB       1,484 KB            558 sec
GCC 3.4.2     744 sec     52 MB       1,677 KB            518 sec
TCC            73 sec     13 MB       2,635 KB           1145 sec
MSC           325 sec     35 MB       1,150 KB            545 sec
BCC55         119 sec     24 MB       1,564 KB            555 sec


Required fixes:
---------------

The gcc sources were unchanged except at one point where tcc did
not accept a typedef symbol as variable name (known issue).

These are the addressed bugs in tcc with tests in cases.c:

1) passing function pointers and structures through ?:
2) saving registers through jumps with ||, &&, !
3) keep rvalue of bitfield assignment: bit1 = bit2 = 1;
4) stringyfy behaviour (problem not solved, just to make it work)
5) keep 'static' property for local function pointers
6) cast short/bool -> float
7) incompatible pointer assigment degraded to warning.
8) alloca implementation
9) indirections with function pointers (***fn)();
10) cast double -> ull (bug in libtcc1.c:__shldi3)


The patch also includes the following:

- tcc.c: slight cleanup with backslash conversion
- tccelf.c: an issue with loop vars mentioned earlier by someone else.
- tccpe.c: windows resources support (pe_load_resource_file)
- tccpe.c: a major fix with relocation for dlls
- _mingw.h: additions to support current mingw headers

The patch is against current CVS (0.9.24 pre). I included tccpe.c as is, since applying as a patch appeared to mess up most of the source formatting.

--- grischka




------------------------------------------------------------------------

_______________________________________________
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]