aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tccasm: support alternate .type syntaxesJoe Soroka2011-02-242-8/+23
|
* tccpp: treat gas comments in .S files as raw text, not tokensJoe Soroka2011-02-232-0/+6
|
* fix warning for tcctest.c introduced with my last commitJaroslav Kysela2011-02-221-1/+1
|
* fix another static struct init issue (arrays with unknown size at end)Jaroslav Kysela2011-02-223-31/+64
|
* Fix complex static initializers (handle additional '}' and '{' brackets)Jaroslav Kysela2011-02-222-4/+34
| | | | | | - added an example to test suite - the "warning: assignment discards qualifiers from pointer target type" is present but harmless
* tccpe: support leading underscore for symbolsgrischka2011-02-133-24/+42
| | | | | | | | | To make this the default, enable this line in libtcc.c:tcc_new: #if defined(TCC_TARGET_PE) && 0 s->leading_underscore = 1; and then recompile tcc and also libtcc1.a
* Add support of asm label for variables.Thomas Preud'homme2011-02-091-10/+23
| | | | | | | | Add support for asm labels for variables, that is the ability to rename a variable at assembly level with __asm__ ("newname") appended in its declaration. See http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/Asm-Labels.html for more details.
* Fix fct asm label: only valid for declarationThomas Preud'homme2011-02-093-58/+26
| | | | | | | | | - Fix function assembly label mechanism introduced in commit 9b09fc376e8c212a767c875e71ca003e3b9a0d2e to only accept alternative name for function declaration. - merge the code with the one introduced in commit 264a103610e3ee86b27b8cbb0e4ec81cd654d980. - Don't memorize token for asm label but directly the asm label.
* Fix incorrect use of basic type as bitflags.Thomas Preud'homme2011-02-071-4/+3
| | | | | Fix incorrect use of basic types as bitflags and inefficiency in commit cf36410e30b3c18be6c556158b2d0d0938f5b77d
* Complain for static fct declared w/o file scopeThomas Preud'homme2011-02-061-0/+4
| | | | | | | | | Error out on static function without file scope and give an explaination to the user This is a rewrite of e9406c09a3212ab3f120412a6bbdacb0cdd25deb but considering problems raised about static local function pointers in 632ee5a54076d417971ae7fa8a0c154441a71499.
* revert "update VT_STRUCT_SHIFT for new VT_VLA"Joe Soroka2011-02-042-2/+2
|
* Revert "Implement C99 Variable Length Arrays"Thomas Preud'homme2011-02-056-169/+33
| | | | This reverts commit a5a50eaafeea0d3ca47bc8fb6baf983743470c60.
* Revert "Reorder increasingly VT_* constants in tcc.h"Thomas Preud'homme2011-02-052-24/+24
| | | | This reverts commit 7f00523e2e1938fc3558164521fe3ecefd9e1747.
* Revert "Make TOK_alloca available for x86-64"Thomas Preud'homme2011-02-051-2/+0
| | | | This reverts commit af26ac56bfc584b70e20158e67f7035024076ec8.
* Revert "Disable C99 VLA when alloca is unavailable."Thomas Preud'homme2011-02-052-10/+2
| | | | This reverts commit e3e5d4ad7a475e30ea13ad1ba9f23e6210d5d431.
* update VT_STRUCT_SHIFT for new VT_VLAJoe Soroka2011-02-042-2/+2
|
* fix crash with get_tok_str() in skip()grischka2011-02-041-1/+1
| | | | | crash was triggered by numbers etc. as unexpected token, i.e. everything that requires additional information with the token.
* Disable C99 VLA when alloca is unavailable.Thomas Preud'homme2011-02-042-2/+10
| | | | | | | | | | | | | | | * Disable C99 VLA detection when alloca is unavailable and protect the new reference to TOK_alloca in decl_initializer in order to compile and run for architecture without working alloca. Not all code of C99 VLA is commented as it would required many ifdef stanza. Just the detection is commented so that VT_VLA is never set any type and the C99 VLA code is compiled but never called. However vpush_global_sym(&func_old_type, TOK_alloca) in decl_initializer needs to be protected by an ifdef stanza as well because it uses TOK_alloca. * include alloca and C99 VLA tests according to availability of TOK_alloca instead of relying on the current architecture
* Make TOK_alloca available for x86-64Thomas Preud'homme2011-02-041-0/+2
| | | | | | | TOK_alloca is now available on x86-64 so make put definition of TOK_alloca outside the BCHECK conditional macro definition but test if arch is i386 or x86-64. This makes C99 VLA works (understand compile) on x86-64.
* Reorder increasingly VT_* constants in tcc.hThomas Preud'homme2011-02-042-24/+24
|
* Implement C99 Variable Length ArraysThomas Preud'homme2011-02-046-33/+169
| | | | | | | Implement C99 Variable Length Arrays in tinycc: - Support VLA with multiple level (nested vla) - Update documentation with regards to VT_VLA - Add a testsuite in tcctest.c
* Correct Changelog wrt. to fix attributionThomas Preud'homme2011-02-041-1/+2
| | | | | Correctly attribute the patch bringing support for Debian GNU/kFreeBSD kernels to Pierre Chifflier.
* tcc: add sysinclude path with -B, like gcc doesJoe Soroka2011-02-021-1/+7
|
* add -isystem cmdline optionJoe Soroka2011-02-012-1/+6
|
* tcctest: plugged memleak (was polluting valgrind reports)Joe Soroka2011-02-011-0/+1
|
* tccasm: accept bracketed offset expressionsJoe Soroka2011-02-012-2/+15
|
* tccasm: accept "fmul/fadd st(0),st(n)" (dietlibc ipow/atanh)Joe Soroka2011-02-012-0/+6
|
* tccasm: allow one-line prefix+op things like "rep stosb"Joe Soroka2011-02-014-2/+68
|
* tccasm: define __ASSEMBLER__ for .S files, like gcc doesJoe Soroka2011-02-012-0/+10
|
* tccpp: fix bug in handling of recursive macrosJoe Soroka2011-02-013-2/+47
|
* weak definitions overrule non-weak prototypesJoe Soroka2011-02-013-2/+27
|
* tccasm: support .weak labelsJoe Soroka2011-02-012-0/+5
|
* support weak attribute on variablesJoe Soroka2011-02-014-4/+29
|
* asmtest: avoid testing against complex nop alignment in gasJoe Soroka2011-01-231-1/+2
| | | | | | | | | | | | | | | | | .align #,0x90 in gas ignores the 0x90 and outputs any kind of nop it feels like. the one avoided by this patch is a 7 byte nop, which gas has been doing since at least 1999: http://sourceware.org/ml/binutils/1999-10/msg00083.html In order to match what gas does, we would need to make code alignment target-specific, import a lot of code, and face the question: exactly which gas {version,target,tune} combo are we trying to match? see i386_align_code in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.c?annotate=1.460&cvsroot=src The smart noppery is turned on via the special casing of 0x90 at line 438 in md_do_align in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.h?annotate=1.1&cvsroot=src
* i386-asm: accept retl as a synonym for retJoe Soroka2011-01-212-0/+4
|
* accept multiple comma separated symbols for .globl/.global directives, like ↵Joe Soroka2011-01-202-2/+7
| | | | gas does
* tcc.c: fix an error when you build an object file with '-pthread' key setSergei Trofimovich2011-01-041-5/+11
| | | | | | | | | | | | | | | | | | | The problem was partially fixed by Henry in the following patch: tcc.c: skip -lpthread when -c option specified But that patch had one brawback: it is sensitive to argument order, as decision is taken during commandline parsing: $ tcc -c a.c -o a.o -pthread # 1. works fine tcc: error: file 'a.c' not found $ tcc -pthread -c a.c -o a.o # 2. blows tcc: error: cannot specify libraries with -c This patch fixes case 2. Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
* lib/alloca*: mark ELF stack access flags as nonexecutableSergei Trofimovich2011-01-043-0/+12
| | | | Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
* Makefile: respect LDFLAGS (set via --extra-ldflags=)Sergei Trofimovich2011-01-041-2/+2
| | | | Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
* Support struct arguments with stdarg.hShinichiro Hamaji2010-12-285-54/+135
| | | | | | | | - add __builtin_va_arg_types to check how arguments were passed - move most code of stdarg into libtcc1.c - remove __builtin_malloc and __builtin_free - add a test case based on the bug report (http://www.mail-archive.com/tinycc-devel@nongnu.org/msg03036.html)
* Make alignments for struct arguments 8 bytesShinichiro Hamaji2010-12-281-4/+4
| | | | | The ABI (http://www.x86-64.org/documentation/abi.pdf) says "The size of each argument gets rounded up to eightbytes"
* Test va_copy in tcctest.cShinichiro Hamaji2010-12-281-2/+4
|
* One more fix for tcc -runShinichiro Hamaji2010-12-281-1/+2
| | | | We don't need r_addend for addresses in PLT.
* Fix for the previous commit.Shinichiro Hamaji2010-12-281-2/+3
| | | | R_X86_64_PLT32 for .so doesn't need DLL relocation.
* Handle r_addend and R_X86_64_PLT32 properly.Shinichiro Hamaji2010-12-281-7/+6
| | | | | | | | | - r_addend should be applied for PLT entries as well - R_X86_64_PLT32 should be handled just like R_X86_64_PC32 - spec says GLOB_DAT and JUMP_SLOT don't need r_addend (not tested) http://www.x86-64.org/documentation/abi.pdf Now we can -run ELF objects generated by GCC.
* configure: --sharedir defaults to /usr/local/shareHenry Kroll III2010-12-231-2/+2
|
* configure: --sharedir documentation rootHenry Kroll III2010-12-221-25/+41
|
* make: fix cannot find -ltcc with --disable-rpathHenry Kroll III2010-12-211-2/+1
|
* make: fix install with CC=tcc and potential link problemHenry Kroll III2010-12-201-1/+6
|
* configure: add --disable-rpath option (Fedora)Henry Kroll III2010-12-202-0/+10
|