词条 | Tiny C Compiler |
释义 |
| name = Tiny C Compiler | logo = | developer = Fabrice Bellard | latest release version = 0.9.27 | latest release date = {{start date and age|2017|12|17}} | programming language = C and Assembly | operating system = Linux, Unix, Windows | genre = C compiler | license = GNU Lesser General Public License | website = {{URL|bellard.org/tcc/}} | repo = {{URL|repo.or.cz/w/tinycc.git}} }} The Tiny C Compiler (a.k.a. TCC, tCc, or TinyCC) is an x86, X86-64 and ARM processor C compiler created by Fabrice Bellard. It is designed to work for slow computers with little disk space (e.g. on rescue disks). Windows operating system support was added in version 0.9.23 (17 Jun 2005). TCC is distributed under the GNU Lesser General Public License (LGPL). TCC claims to implement all of ANSI C (C89/C90),[1] much of the C99 ISO standard,[2] and many GNU C extensions including inline assembly. FeaturesTCC has a number of features that differentiate it from other current C compilers:
Compiled program performanceAlthough the TCC compiler itself is exceptionally fast, there is an inherent trade off between this size of the compiler and the performance of the code that TCC produces. TCC does perform a few optimizations, such as constant propagation for all operations, multiplications and divisions are optimized to shifts when appropriate, and comparison operators are specially optimized (by maintaining a special cache for the processor flags). It also does some simple register allocation, which prevents many extraneous save/load pairs inside a single statement. But in general, TCC's implementation emphasizes smallness instead of optimally-performing results. TCC generates code in a single pass, and does not perform most of the optimizations performed by other compilers such as GCC. TCC compiles every statement on its own, and at the end of each statement register values are written back to the stack and must be re-read even if the next line uses the values in registers (creating extraneous save/load pairs between statements). TCC uses only some of the available registers (e.g., on x86 it never uses ebx, esi, or edi because they need to be preserved across function calls).[4] Here are two benchmark examples:
UsesWell-known uses of tcc include:
HistoryTCC has its origins in the Obfuscated Tiny C Compiler (OTCC), a program Bellard wrote to win the International Obfuscated C Code Contest (IOCCC) in 2001. After that time, Bellard expanded and deobfuscated the program to produce tcc.[11] At some time prior to 4 February 2012 Fabrice Bellard updated the project's official web page to report that he was no longer working on TCC.[12] Since Bellard's departure from the project, various people and groups have distributed patches or maintained forks of TCC to build upon or fix issues with TCC. This includes Dave Dodge's collection of unofficial tcc patches,[13] Debian and kfreebsd downstream patches,[14] and grischka's gcc patches.[15] Grischka also set up a public Git repository for the project[16] that contains a mob branch[17] where numerous contributions, including a shared build, cross-compilers, and SELinux compatibility were added. Grischka's GIT repository later became the official TCC repository (linked to by Fabrice Bellard's Savannah project page [18]). Current statusAs of December 2017 both the official TCC mailing list[19] and the official Git repository (as linked to by Fabrice Bellard's Savannah project page[20]) show active discussion and development by many developers and interested users. In December 2017, grischka announced on the mailing list that TCC version 0.9.27 was released [21]. See also{{Portal|Free and open-source software}}
References1. ^Tiny C Compiler Reference Documentation accessed on 2008-08-07 2. ^According to the project's TODO list complex types are the only missing C99 feature. Variable Length Arrays have been added in TCC 0.9.26 3. ^Tiny C Compiler homepage 4. ^Glöckner, Daniel. Re: Tinycc-devel (no subject), September 8, 2006. 5. ^TCCBOOT 6. ^Wheeler, David A. Countering Trusting Trust through Diverse Double-Compiling. ACSAC. 7. ^tinycc-devel (thread) 8. ^Cinpy {{Webarchive|url=https://web.archive.org/web/20081120164629/http://www.cs.tut.fi/~ask/cinpy/ |date=2008-11-20 }} 9. ^JavaScript Linux 10. ^Super Micro-Max Chess Engine 11. ^Bellard, Fabrice. Obfuscated Tiny C Compiler 12. ^[https://web.archive.org/web/20120204081201/http://bellard.org/tcc/ The oldest archive.org snapshot of the TCC home page showing Fabrice Bellard's announcement of ceasing work on TCC.] 13. ^Dave Dodge's collection of unofficial tcc patches {{Webarchive|url=https://web.archive.org/web/20070331221112/http://www.dododge.net/tcc/patches.html |date=2007-03-31 }} 14. ^Debian and kfreebsd downstream patches 15. ^1 grischka, GCC by TCC (some fixes), 29 Sep 2005 16. ^grischka, Public Git Hosting for tcc 17. ^grischka, mob branch for tcc 18. ^[https://savannah.nongnu.org/projects/tinycc Official Savannah project page] 19. ^[https://lists.gnu.org/archive/html/tinycc-devel/ Official TCC mailing list] 20. ^[https://repo.or.cz/w/tinycc.git/ Official Git source code repository] 21. ^Official TCC mailing list, 2017-12-27 entry External links
5 : C compilers|Free compilers and interpreters|Free software programmed in C|Software using the LGPL license|Software written primarily in assembly language |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。