aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rename i386-tok.h i386-asm.c, add PRINTF_ASM_CODEjiang2014-04-307-52/+53
|
* rename libtcc1.cjiang2014-04-3010-47/+47
|
* Fix va_arg bug, Fix type conversion bug, an increase of loc_stack () ↵jiang2014-04-305-154/+236
| | | | function is used to manage loc
* Restore eda2c756edc4dca004ba217d5bf361235dd9de1fjiang2014-04-306-67/+148
|
* Reduce the generation of machine code for x86_64, Less of sizejiang2014-04-293-251/+244
|
* So that the generated code, and more shortjiang2014-04-2978-3577/+6326
|\
| * fix test3 for x86_64-gen.cjiang2014-04-281-1/+1
| |
| * fix abitest.c for x86_64 bugjiang2014-04-282-3/+1
| |
| * fix tccpp.cjiang2014-04-281-24/+0
| |
| * update static void parse_number(const char *p) for tccpp.cjiang2014-04-281-220/+138
| |
| * add test for abitest.cjiang2014-04-281-5/+53
| |
| * tccpe: adjust for new 'hidden' symbols featuregrischka2014-04-173-15/+17
| | | | | | | | | | in order to avoid conflicts with windows specific (ab)usage of the Elf32_Sym -> st_other field.
| * Improve efficiency of macro concatenationThomas Preud'homme2014-04-141-26/+2
| | | | | | | | | | | | As per grischka comment, always output a space after macro concatenation instead of trying to detect if it's necessary as the current approach has a huge cost.
| * Remove unused variableMichael Matz2014-04-141-1/+0
| |
| * x86_64: Handle PLT relocs to hidden symbolsMichael Matz2014-04-141-2/+9
| | | | | | | | | | For calls to hidden symbols we don't need a PLT slot, rewrite the reloc into PC32.
| * Parse assembler .hidden directiveMichael Matz2014-04-143-4/+12
| | | | | | | | | | This makes TCCs assembler understand the '.hidden symbol' directive (and emits a STV_HIDDEN ELF symbol then).
| * Parse and emit hidden visibilityMichael Matz2014-04-143-5/+69
| | | | | | | | | | | | | | This adds parsing of (GCC compatible) visibility attribute in order to mark selected global symbols as hidden. The generated .o files contain hidden symbols already, the TCC linker doesn't yet do the right thing.
| * tccpe: speed up .def file loadinggrischka2014-04-131-17/+7
| | | | | | | | | | The fgets replacement meant to work with "int fd" was just too slow.
| * tests2: fix and enable 46_grep test.minux2014-04-123-8/+13
| |
| * tests2: fix 30_hanoi test and enable it.minux2014-04-122-2/+2
| |
| * Make build CPU detection a tad more flexibleThomas Preud'homme2014-04-121-50/+59
| |
| * Fix preprocessor concat with empty argThomas Preud'homme2014-04-125-6/+56
| |
| * build: add initial NetBSD support.minux2014-04-123-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Not able to generate ELF files on NetBSD yet (lacks the note and crt1.o is actually named crt0.o on NetBSD), but -run works with these extra defines: -D__lint__ -D"__symbolrename(x)=asm(#x)" -D__NetBSD__ The -D__lint__ is an ugly hack, TCC should be able to emulate GCC just fine, but it seems TCC doesn't support __builtin_va_list yet? typedef __builtin_va_list __va_list; /usr/include/sys/ansi.h:72: error: ';' expected (got "__va_list")
| * build: ignore and properly clean tests/vla_testminux2014-04-122-1/+2
| |
| * tcc.h: add ELF interpreter for DragonFly BSD.minux2014-04-121-0/+2
| |
| * tccrun: fix build on DragonFly BSD.minux2014-04-121-2/+2
| |
| * win32/include/process.h: update prototypes to match mingw.minux2014-04-121-12/+12
| | | | | | | | | | This eliminates an argument type mismatch warning during tcc self-compilation on windows.
| * tcc, libtcc: fix build on windows with latest mingw.minux2014-04-112-2/+2
| |
| * tiny_impdef: remove artificial length restriction.minux2014-04-111-1/+1
| |
| * add missing prototypesUrs Janssen2014-04-101-4/+8
| |
| * Prevent ## to appear at start or end of macroThomas Preud'homme2014-04-086-4/+20
| |
| * Add new tests for macro nestingThomas Preud'homme2014-04-073-1/+13
| |
| * Fix test for macro nestingThomas Preud'homme2014-04-071-0/+2
| |
| * Corrected spelling mistakes in comments and stringsVincent Lefevre2014-04-0711-18/+18
| |
| * corrected a typoVincent Lefevre2014-04-071-1/+1
| |
| * tests2: cleanupgrischka2014-04-075-32/+26
| | | | | | | | | | | | | | | | | | - remove -norunsrc switch Meaning and usage (-run -norun...???) look sort of screwed. Also general usefulness is unclear, so it was actually to support exactly one (not even very interesting) test This partially reverts e31579b0769e1f9c0947d12e83316d1149307b1a
| * win32: libtcc1.a needs to be built with tccgrischka2014-04-072-5/+8
| | | | | | | | | | gcc/mingw produces msvc compatible pecoff objects, tcc only knows ELF.
| * stdbool.h: Make conformant to ISOC99Michael Matz2014-04-071-0/+1
| | | | | | | | | | | | For conformance to ISO C the stdbool.h header has to provide the macro __bool_true_false_are_defined (defined to 1). Yep, that name is really in the standard.
| * Declare wint_t in <stddef.h> when neededMichael Matz2014-04-072-0/+24
| | | | | | | | | | Some old glibcs <wctype.h> require <stddef.h> to provide wint_t, accomodate them.
| * win32: warn people about using undeclared WINAPI functionsgrischka2014-04-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | *** UNCONDITIONALLY *** Esp. sihce tinycc winapi headers are not as complete as people might expect this can otherwise lead to obscure problems that are difficult to debug. (Originally 'warn_implicit_function_declaration' was set to 1 always for windows but someone must have deleted that line)
| * ELF: Remove traces of old RUNTIME_PLTGOT codeMichael Matz2014-04-063-82/+1
| | | | | | | | | | The last users of it went away, no use in keeping this code.
| * arm: Use proper PLT/GOT for -run.Michael Matz2014-04-062-10/+54
| | | | | | | | | | | | | | | | | | | | | | Same as with x86_64, disable the runtime_plt_and_got hack for -run on arm as well. For that we need to handle several relocations as (potentially) generating PLT slots as well. Tested with mpfr-3.1.2 and gawk (both using --disable-shared), there are two resp. five pre-existing problems, so no regressions. This also works toward enabling real shared libs for arm, but it's not there yet.
| * x86_64: Create proper PLT and GOT also for -runMichael Matz2014-04-063-17/+24
| | | | | | | | | | | | This makes us use the normal PLT/GOT codepaths also for -run, which formerly used an on-the-side blob for the jump tables. For x86_64 only for now, arm coming up.
| * arm: Provide alloca()Michael Matz2014-04-053-4/+15
| | | | | | | | | | | | This provides a simple implementation of alloca for ARM (and enables the associated testcase). As tcc for ARM doesn't contain an assembler, we'll have to resort using gcc for compiling it.
| * Git should ignore tests2 executables.Michael Matz2014-04-051-0/+1
| |
| * tests2: Build executables as wellMichael Matz2014-04-051-1/+6
| | | | | | | | | | The individual tests in tests2 are checked only with -run. Build (and check) executables as well, to test also building executables.
| * arm: Handle R_ARM_NONE relocsMichael Matz2014-04-041-0/+4
| | | | | | | | | | | | | | These relocations are used to express a dependency on a certain symbol (e.g. for EABIs exception handling to the __aeabi_unwind_cpp_pr{0,1,2} routines). Just ignore them in reloc processing.
| * tccgen: x86_64: fix garbage in the SValue upper bitsgrischka2014-04-043-70/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was going wrong (case TOK_LAND in unary: computed labels) - vset(&s->type, VT_CONST | VT_SYM, 0); - vtop->sym = s; This does the right thing and is shorter: + vpushsym(&s->type, s); Test case was: int main(int argc, char **argv) { int x; static void *label_return = &&lbl_return; printf("label_return = %p\n", label_return); goto *label_return; //<<<<< here segfault on linux X86_64 without the memset on vset printf("unreachable\n"); lbl_return: return 0; } Also:: - Rename "void* CValue.ptr" to more usable "addr_t ptr_offset" and start to use it in obvious cases. - use __attribute__ ((noreturn)) only with gnu compiler - Revert CValue memsets ("After several days searching ...") commit 4bc83ac3933efa565ae3326b55fcd711b63c073d Doesn't mean that the vsetX/vpush thingy isn't brittle and there still might be bugs as to differences in how the CValue union was set and is then interpreted later on. However the big memset hammer was just too slow (-3% overall).
| * run: Always create .got relocsMichael Matz2014-04-041-0/+7
| | | | | | | | | | | | | | When output is memory we applied the correct GOT offset for certain relocations (e.g. _GOT32), but we forgot to actually fill the got entries with the final symbol values, so unconditionally create relocs against .got as well.
| * ELF: Make first PT_LOAD cover headersMichael Matz2014-04-031-5/+10
| | | | | | | | | | | | | | | | This makes it so that the first PT_LOAD segment covers ELF and program header and .interp (contained in the same page anyway, right before the start of the first loaded section). binutils strip creates invalid output otherwise (which strictly is a binutils bug, but let's be nice anyway).