aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 64-bit tests now pass (well, nearly).James Lyon2013-04-248-142/+295
| | | | | tcctest1-3 fail, but this appears to be due to bugs in GCC rather than TCC (from manual inspection of the output).
* Added CMake build system (to facilitate Win64 builds)James Lyon2013-04-215-4/+254
| | | | | | Win32 build and tests work under CMake, however I haven't added install code yet. Win64 build fails due to chkstk.S failing to assemble.
* Workaround for MinGWs use of 80-bit long double on Win32.James Lyon2013-04-192-8/+27
| | | | | | This is incompatible with MSVC and TCC on Win32. Bounds checking appears to be broken (test4).
* Fixed 64-bit integer bug introduced by x86-64 ABI work.James Lyon2013-04-192-13/+12
| | | | Now I need to check that the x86-64 stuff still works.
* Improved x86-64 XMM register argument passing.James Lyon2013-04-192-76/+119
| | | | | | | Also made XMM0-7 available for use as temporary registers, since they are not used by the ABI. I'd like to do the same with RSI and RDI but that's trickier since they can be used by gv() as temporary registers and there isn't a way to disable that.
* Fixed problems with XMM1 use on Linux/x86-64.James Lyon2013-04-193-112/+120
| | | | | | All tests pass. I think I've caught all the cases assuming only XMM0 is used. I expect that Win64 is horribly broken by this point though, because I haven't altered it to cope with XMM1.
* Most x86-64 tests now work; only on error in test1-3.James Lyon2013-04-193-67/+129
| | | | | | I've had to introduce the XMM1 register to get the calling convention to work properly, unfortunately this has broken a fair bit of code which assumes that only XMM0 is used.
* Got test1-3 working on x86-64.James Lyon2013-04-194-85/+197
| | | | | | There are probably still issues on x86-64 I've missed. I've added a few new tests to abitest, which fail (2x long long and 2x double in a struct should be passed in registers).
* x86-64 ABI fixes.James Lyon2013-04-199-75/+334
| | | | | | | | | abitest now passes; however test1-3 fail in init_test. All other tests pass. I need to re-test Win32 and Linux-x86. I've added a dummy implementation of gfunc_sret to c67-gen.c so it should now compile, and I think it should behave as before I created gfunc_sret.
* Added some additional tests to abitest.cJames Lyon2013-04-181-13/+51
| | | | This is just to ensure that I haven't (and don't) really mess anything up.
* Tests in abitest.c now work on Win32.James Lyon2013-04-187-66/+173
| | | | | | | I expect that Linux-x86 is probably fine. All other architectures except ARM are definitely broken since I haven't yet implemented gfunc_sret for these, although replicating the current behaviour should be straightforward.
* Added ABI compatibility tests with native compiler using libtcc.James Lyon2013-04-173-1/+91
| | | | | | | | | | Only one test so far, which fails on Windows (with MinGW as the native compiler - I've tested the MinGW output against MSVC and it appears the two are compatible). I've also had to modify tcc.h so that tcc_set_lib_path can point to the directory containing libtcc1.a on Windows to make the libtcc dependent tests work. I'm not sure this is the right way to fix this problem.
* Fixed tests on Windows (including out-of-tree problems)James Lyon2013-04-177-29/+63
| | | | | | | | | | | Modified tcctest.c so that it uses 'double' in place of 'long double' with MinGW since this is what TCC does, and what Visual C++ does. Added an option -norunsrc to tcc to allow argv[0] to be set independently of the compiled source when using tcc -run, which allows tests that rely on the value of argv[0] to work in out-of-tree builds. Also added Makefile rules to automatically update out-of-tree build Makefiles when in-tree Makefiles have changed.
* Fixed out of tree build problem on Windows.James Lyon2013-04-171-7/+7
| | | | | | | | Some files installed are not generated so need to be copied from the source tree rather than the build tree. I also switched texi2html for makeinfo --html since texi2html is apparently unmaintained.
* Fix building instruction wrt make/gmakeThomas Preud'homme2013-04-081-6/+8
| | | | | | Revert building instruction to mention the use of make instead of gmake but add a note to tell FreeBSD and OSX users to use gmake instead of make.
* Update README,add x86_64/arm,FreeBSD/OSX etc.Jov2013-03-251-7/+8
| | | | | Change make to gmake because make will not be gnu make in some OS like FreeBSD
* Fix synchronization between data and instr cachesThomas Preud'homme2013-03-191-1/+1
|
* Flush caches before -running programThomas Preud'homme2013-03-182-0/+12
| | | | | | | | | | | | On some architectures, ARM for instance, the data and instruction caches are not coherent with each other. This is a problem for the -run feature since instructions are written in memory, and are thus written in the data cache first and then later flushed to the main memory. If the instructions are executed before they are pushed out of the cache, then the processor will fetch the old content from the memory and not the newly generated code. The solution is to flush from the data cache all the data in the memory region containing the instructions and to invalidate the same region in the instruction cache.
* Fix configure script on FreeBSDThomas Preud'homme2013-03-141-1/+2
| | | | | * x86-64 architectures are reported as amd64 by uname -r * FreeBSD platform don't need -ldl for linking
* Update .gitignore with regards to test changesThomas Preud'homme2013-03-111-1/+2
|
* document $CPATH, $C_INCLUDE_PATH, $LIBRARY_PATHUrs Janssen2013-02-201-3/+22
|
* don't confuse LD_LIBRARY_PATH (run time) with LIBRARY_PATH (link time)Urs Janssen2013-02-191-2/+2
|
* added CPATH, C_INCLUDE_PATH and LD_LIBRARY_PATHAndrew Aladjev2013-02-193-0/+21
|
* remove doubled prototypeUrs Janssen2013-02-184-6/+4
| | | | | fix documentation about __TINYC__ define __STDC_HOSTED__ like __STDC__
* Fix GNU Hurd interpreter pathThomas Preud'homme2013-02-181-0/+2
|
* Add support for KfreeBSD 64bitsThomas Preud'homme2013-02-182-1/+10
|
* libtcc: tcc_define_symbol() uses strings, fix segfaultRoy2013-02-181-1/+1
|
* Define __STDC_HOSTED__ to a sane valueThomas Preud'homme2013-02-171-1/+1
| | | | | | | Define __STDC_HOSTED__ to one as the correct values should be either 1 or 0. Since tinycc is hosted, it should be set to 1. Thanks Christian Jullien for the report.
* Define __STDC_HOSTED__Thomas Preud'homme2013-02-171-0/+1
| | | | | | | | | Quoting Michael Matz on tinycc-devel: "__STDC_HOSTED__ : not set (incorrectly, it should probably be set to 1 given that tcc assumes a normal main() and that the rest of the provided facilities is provided by the C library not under tcc control)"
* add version number to manpageUrs Janssen2013-02-1722-56/+57
| | | | | | | avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English)
* Release TinyCC 0.9.26Thomas Preud'homme2013-02-151-1/+1
|
* fixed pasto in in 108b2876; background for the additional $CC test is:Urs Janssen2013-02-151-1/+1
| | | | | | | GCC_MAJOR may be set even is $CC not realy gcc (but i.e. clang, which (as of 3.1) requires an addtional CFLAG to accept the non portable (gnuisms all over the place; try to cimpile tcc with Sun^HOracle, Intel, Pathscale, ... compiler) code).
* - document -dumpversionUrs Janssen2013-02-154-3/+6
| | | | - fixed a broken prototype
* - don't use GCC_MAJOR to see if we're not using gcc as GCC_MAJOR might be setUrs Janssen2013-02-152-1/+3
| | | | during configure even with --cc=notgcc as long as gcc is installed.
* Revert "Don't search libgcc_s.so.1 on /lib64"Thomas Preud'homme2013-02-141-5/+1
| | | | This reverts commit b9f089fc4a3c852858bbc8e60c5ac19b7736d7a9.
* configure: detect ARM variantsgrischka2013-02-142-33/+37
| | | | Using gnu make's variable variable-names.
* Don't search libgcc_s.so.1 on /lib64Thomas Preud'homme2013-02-141-1/+5
| | | | | It seems libgcc_s.so.1 is systematically on /lib/ (whether /lib/$triplet for multiarch systems or just /lib for other systems).
* configure: pass CONFIG_xxxDIR/PATH options via commandlinegrischka2013-02-146-38/+30
| | | | | | | | | | | | | | | - except for CONFIG_SYSROOT and CONFIG_TCCDIR Strictly neccessary it is only for CONFIG_MULTIARCHDIR because otherwise if it's in config.h it is impossible to leave it undefined. But it is also nicer not to use these definitions for cross-compilers. - Also: lib/Makefile : include ../Makefile for CFLAGS lib/libtcc1.c : fix an issue compiling tcc with tcc on x64
* Add missing heading slash to detect /lib64 systemsThomas Preud'homme2013-02-141-1/+1
|
* Add arm ABI detection in conftest.cThomas Preud'homme2013-02-141-1/+9
|
* Another attempt to "detect" multiarchThomas Preud'homme2013-02-142-17/+55
|
* - make clang accept unportable code in libtcc1.cUrs Janssen2013-02-143-0/+11
| | | | - add -dumpversion cmd.line opt
* configure: cleanupgrischka2013-02-148-225/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add quotes: eval opt=\"$opt\" - use $source_path/conftest.c for OOT build - add fn_makelink() for OOT build - do not check lddir etc. on Windows/MSYS - formatting config-print.c - rename to conftest.c (for consistency) - change option e to b - change output from that from "yes" to "no" - remove inttypes.h dependency - simpify version output Makefile: - improve GCC warning flag checks tcc.h: - add back default CONFIG_LDDIR - add default CONFIG_TCCDIR also (just for fun) tccpp.c: - fix Christian's last warning tccpp.c: In function ‘macro_subst’: tccpp.c:2803:12: warning: ‘*((void *)&cval+4)’ is used uninitialized in this function [-Wuninitialized] That the change fixes the warning doesn't make sense but anyway. libtcc.c: - tcc_error/warning: print correct source filename/line for token :paste: (also inline :asm:) lddir and multiarch logic still needs fixing.
* Create config-print program to test $ccThomas Preud'homme2013-02-132-46/+41
| | | | | | Create a helper program called config-print to print informations relative to the BUILD/HOST environment in the case of native compilation.
* Various fixes for f9ac2013Thomas Preud'homme2013-02-131-7/+3
|
* Detect multiarch triplet and lddir from ldd outputThomas Preud'homme2013-02-132-44/+8
|
* Fix previous commitThomas Preud'homme2013-02-131-1/+1
| | | | Fix commit f6cfaa6d2591b8931f8fde9aebf7822202b78810
* Improve multiarch detectionThomas Preud'homme2013-02-133-10/+44
| | | | | | * Detect multiarch at configure time * Detect based on the place where crti.o is * Define multiarch triplet in tcc.h
* libtcc: new LIBTCCAPI tcc_set_options(TCCState*, const char*str)grischka2013-02-1212-958/+880
| | | | | | | | | | | | | | | | | | | This replaces -> use instead: ----------------------------------- - tcc_set_linker -> tcc_set_options(s, "-Wl,..."); - tcc_set_warning -> tcc_set_options(s, "-W..."); - tcc_enable_debug -> tcc_set_options(s, "-g"); parse_args is moved to libtcc.c (now tcc_parse_args). Also some cleanups: - reorder TCCState members - add some comments here and there - do not use argv's directly, make string copies - use const char* in tcc_set_linker - tccpe: use fd instead of fp tested with -D MEM_DEBUG: 0 bytes left
* tcc --help: update option summarygrischka2013-02-102-34/+55
| | | | tcc-doc.texi: also