aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Align on 4n bytes when copying fct args on stackThomas Preud'homme2013-02-051-0/+1
| | | | | When copying function arguments on stack in prolog, use multiple of 4 bytes for alignment.
* portability: make tcc_get_symbol() available for non-nativegrischka2013-02-041-2/+2
| | | | | For consistency with tcc_add_symbol(). Use uintptr_t here also.
* Slightly improved support for !gcc compilersThomas Preud'homme2013-02-041-1/+3
| | | | | Hack before a complete solution after 0.9.26's release to be able to compile tcc with clang.
* win32: Honor "-Wl,-subsystem=console/gui" optiongrischka2013-02-041-9/+10
|
* tccrun.c: unify rt_get_caller_pc prototypegrischka2013-02-041-18/+15
|
* Makefile: fix "allow CONFIG_LDDIR=lib64 configuration"grischka2013-02-041-4/+4
| | | | I forgot the commas.
* portability: fix void* <-> target address conversion confusiongrischka2013-02-046-130/+136
| | | | | | - #define addr_t as ElfW(Addr) - replace uplong by addr_t - #define TCC_HAS_RUNTIME_PLTGOT and use it
* Makefile: allow CONFIG_LDDIR=lib64 configurationgrischka2013-02-042-12/+14
|
* win32: wincrt1.c: include stdlib.h for exit()grischka2013-02-041-0/+1
|
* c67: remove global #define's for TRUE/FALSE/BOOLgrischka2013-02-045-32/+32
| | | | Also use uppercase TRUE/FALSE instead of true/false
* arm-gen.c: fix var initialization in gfunc_callThomas Preud'homme2013-02-041-2/+1
| | | | | | Fix initialization of args_size before doing register allocation. When adding hardfloat calling convention the initialization stopped being performed when !defined (TCC_ARM_EABI).
* arm: force rounding towards zero on cast to integer with VFPDaniel Glöckner2013-02-041-1/+1
| | | | | Cast to integer should not be affected by the current rounding mode as set by fesetround.
* arm: fix conversion from float/double to signed integer with VFPDaniel Glöckner2013-02-031-1/+1
| | | | The signed flag was not encoded in the instruction.
* arm: fix conversion from integer to float/double with VFPDaniel Glöckner2013-02-031-1/+1
| | | | The source register was not encoded in the instruction.
* Revert "Add predictability in CType initialization."Thomas Preud'homme2013-01-311-6/+0
| | | | This reverts commit 93785149ed61b7165510ff30149f297cf0821c88.
* Revert "Don't call elf_hash on NULL value"Thomas Preud'homme2013-01-311-1/+1
| | | | This reverts commit 505329b5b3ee4cb47d0a3590ccd62a65dbf83fc9.
* safety: replace occurrences of strcpy by pstrcpygrischka2013-01-314-21/+11
|
* Revert "Check whether structure fields have a type"Thomas Preud'homme2013-01-311-2/+1
| | | | This reverts commit 981eb84d8ab91aafe73d5eeb218ffe31d28b1014.
* Check whether structure fields have a typeThomas Preud'homme2013-01-311-1/+2
|
* Don't call elf_hash on NULL valueDomingo Alvarez Duarte2013-01-311-1/+1
| | | | | | Make sur elf_hash is never invoked with a NULL value. Signed-off-by: Thomas Preud'homme <robotux@celest.fr>
* Add predictability in CType initialization.Domingo Alvarez Duarte2013-01-311-0/+6
| | | | | | Initialize the ref field to 0 when manipulating a CType. Signed-off-by: Thomas Preud'homme <robotux@celest.fr>
* Fix cross-compilation out-of-tree buildThomas Preud'homme2013-01-301-2/+2
| | | | | | Add tcc.c as a prerequesite of the %-tcc$(EXESUF) target and compile $< instead of tcc.c to make sure tcc.c is search in directories specified by VPATH.
* Changelog: cleanupgrischka2013-01-301-16/+22
|
* arm: define TCC_ARM_VERSION for cross compilergrischka2013-01-301-0/+4
|
* tccpe: no debug, no stabsgrischka2013-01-301-1/+4
|
* configure: use relative paths for in-tree buildgrischka2013-01-303-16/+19
| | | | | | Also - move CPPFLAGS to Makefile - Use top_srcdir in lib/Makefile
* Add my copyright for changes in arm-gen.cThomas Preud'homme2013-01-301-0/+1
|
* Changelog updateThomas Preud'homme2013-01-301-0/+1
|
* Update ChangelogThomas Preud'homme2013-01-301-0/+2
|
* Favor arm hardfloat over arm softfloat.Thomas Preud'homme2013-01-291-4/+4
| | | | | | | Favor ARM hardfloat over ARM softfloat calling convention. In particular, this solve the problem of the raspbian distribution where the softfloat ld.so pathname (lib/ld-linux.so.3) is actually a symlink to the hardfloat ld.so pathname (/lib/arm-linux-gnueabihf/ld-2.13.so).
* Fix overflow detection in ARM relocationThomas Preud'homme2013-01-281-2/+2
| | | | | | Fix overflow detection for R_ARM_CALL, R_ARM_PC24, R_ARM_JUMP24 and R_ARM_PLT32 relocations on ARM. 26 bits means 25 bits for positive and negative offsets !
* Fix stack alignment on 8 bytes at function callThomas Preud'homme2013-01-271-3/+3
| | | | | Ensure stack pointer is correctly adjusted in prolog to be aligned on 8 bytes after the change of frame linking.
* Don't do builtin_frame_address test with ARM gccThomas Preud'homme2013-01-261-0/+2
| | | | | | | | gcc fails the builtin_frame_address test on ARM so we disable it. As a consequence, the diff between gcc and tcc's output is unecessarily bigger. Given the big size of the diff currently, this doesn't make a big difference but may allow to detect a regression in tcc's implementation of builtin_frame_address.
* Organize frames in a real linked list on ARMThomas Preud'homme2013-01-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the linking of the frames on ARM. Instead of having fp points 12 bytes above where the old fp is stored, let fp points where the old fp is stored. That is, we switch from: | . | | . | | . | | | | params | <-- fp -------- | oldlr | -------- | oldip | -------- | oldfp | -------- to: | . | | . | | . | | | | params | -------- | oldlr | -------- | oldip | -------- | oldfp | <-- fp --------
* Use gcc to generate tcctest.gccThomas Preud'homme2013-01-251-1/+1
|
* Link STT_GNU_IFUNC into STT_FUNC in executable.Thomas Preud'homme2013-01-251-2/+11
| | | | | | | | Indirect functions shall have STT_FUNC type in executable dynsym section. Indeed, a dlsym call following a lazy resolution would pick the symbol value from the executable dynsym entry. This would contain the address of the function wanted by the caller of dlsym instead of the address of the function that would return that address.
* win32: _mingw.h: do not undef NULLgrischka2013-01-242-2/+1
| | | | | | | | | Not wise if stddef.h was already included. This is related to commit 3aa26a794e24a298493a2bc9d70fbd9aebf6437a Instead hack stddef.h to have identical definition and thus avoid the issue mentionned there.
* Fix [f]getc return value usage in 40_stdio testThomas Preud'homme2013-01-241-1/+1
| | | | | | Store [f]getc return value into an int instead of char, as per prototype. This fix an issue when char is unsigned (as is on arm for both tcc and gcc).
* Revert "Optimize vswap()"grischka2013-01-142-33/+8
| | | | | | | | | | This reverts commit 63193d1794b037eb4f3b6551596fa8a6d423e0c3. Had some problems (_STATIC_ASSERT) and was too ugly anyway. For retry, I'd suggest to implement a general function static inline void memswap (void *p1, void* p2, size_t n); and then use that. If you do so, please keep the original code as comment.
* Revert mistake in "win32: malloc.h: fix win32 ... _STATIC_ASSERT"grischka2013-01-142-69/+0
| | | | | | | from commit fc574f14984d11f1ead50560d1bdc5ae0eaf6d8d. The files from include are copied to win32/include with make install or build-tcc.bat.
* Fix out-of-tree build with relative path to rootThomas Preud'homme2013-01-141-2/+2
| | | | | Fix path of Makefile symlinks in a out-of-tree build where the root directory of the source is given as a relative path.
* Install libtcc.h when invoking make installThomas Preud'homme2013-01-141-0/+2
| | | | This fix commit e79281f58ec302e8cc9dfc7d00e06f426fcd2acd
* Revert "Added what I call virtual io to tinycc this way we can make a ↵Thomas Preud'homme2013-01-1412-903/+62
| | | | | | | | monolitic executable or library that contains all needed to compile programs, truly tinycc portable." This reverts commit 59e18aee0e509a3ca75dbe6f909e18c1d17893d1. tcc is being stabilized now in order to do a new release soon. Therefore, such a change is not appropriate now.
* Revert "pe: fix tcc not linking to user32 and gdi32"Thomas Preud'homme2013-01-141-1/+1
| | | | | | This reverts commit 943574aba54713ca4a17fe33aadde5abee233b53. The empty string in "libs" was intended behavior, as can be seen from the "if (0 == *p)" below.
* Stop setting -Wno-unused-result switch in MakefileThomas Preud'homme2013-01-131-11/+0
| | | | | | | | | | This commit revert commit 061b5799cc1feb15014da589ea98057deda14a23 and subsequent commits to detect whether -Wno-unused-result is supported or not by the compiler used to compile tcc. No warning about unused results is issued in a normal build and thus this switch is only needed if calling make with extra switches in CFLAGS or CPPFLAGS. It should thus be added with the extra switches when calling make and not in the Makefile.
* Fix C99ism in vswap()Thomas Preud'homme2013-01-131-1/+2
| | | | | Declare vtopl in vswap at the beginning of the function before any assignments. Doing otherwise means C99 is assumed when compiling.
* Added what I call virtual io to tinycc this way we can make a monolitic ↵mingodad2013-01-1112-62/+903
| | | | | | executable or library that contains all needed to compile programs, truly tinycc portable. Tested under linux exec the "mk-it" shell script and you'll end up with a portable tinycc executable that doesn't depend on anything else.
* Fix "Optimize cstr_reset() to only reset string to empty"grischka2013-01-061-1/+1
| | | | | | This fixes commit 8eb92e605200b1fe8d570ad309e28245c3f1af0a Remove memory leak.
* tccpp: alternative fix for #include_next infinite loop buggrischka2013-01-064-78/+39
| | | | | | | | | | | | | | | This replaces commit 3d409b08893873b917ccb8c34398bc41a4e84d7c - revert old fix in libtcc.c - #include_next: look up the file in the include stack to see if it is already included. Also: - streamline include code - remove 'type' from struct CachedInclude (obsolete because we check full filename anyway) - remove inc_type & inc_filename from struct Bufferedfile (obsolete) - fix bug with TOK_FLAG_ENDIF not being reset - unrelated: get rid of an 'variable potentially uninitialized' warning
* Stop returning 0 in cmp_comparison_testThomas Preud'homme2013-01-061-1/+0
| | | | cmp_comparison_test has no return value and should thus not return 0.