aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add arm64 (AArch64) as a target architecture.Edmund Grimley Evans2015-02-2316-40/+3265
|
* Use RELA relocations properly for R_DATA_PTR on x86_64.Edmund Grimley Evans2015-02-214-13/+46
| | | | | | | libtcc.c: Add greloca, a generalisation of greloc that takes an addend. tcc.h: Add greloca and put_elf_reloca. tccelf.c: Add put_elf_reloca, a generalisation of put_elf_reloc. tccgen.c: On x86_64, use greloca instead of greloc in init_putv.
* tcc-doc.texi: Explain VT_LLOCAL a bit better.Edmund Grimley Evans2015-02-201-2/+4
| | | | And delete the sentence about it being removed.
* Fix handling of case_reg in switch statement.Edmund Grimley Evans2015-02-201-0/+3
| | | | | | The back end functions gen_op(comparison) and gtst() might allocate registers so case_reg should be left on the value stack while they are called and set again afterwards.
* The "open a whisky and cut your finger open" patchThomas Preud'homme2015-02-183-37/+62
| | | | Make integer constant parsing C99 compliant
* Add support for .p2align asm directive.Reimar Döffinger2015-01-202-0/+9
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Fix macro expansion of empty args.Reimar Döffinger2015-01-184-2/+14
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Set CONFIG_MULTIARCHDIR for cross compilers.Reimar Döffinger2015-01-181-4/+4
| | | | | | | Chances a cross-compiler will find a working crt*.o in /usr/lib are more or less 0. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Build also WinCE cross compiler when cross compilers enabled.Reimar Döffinger2015-01-181-5/+5
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Allow tcc to understand a setob,... opcodes as alias to seto,...seyko2015-01-065-34/+39
| | | | | | PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html This is fix PR8686 for llvm: accepting a 'b' suffix at the end of all the setcc instructions.
* Warn about a conflicting compile options spectified on the command line.seyko2015-01-063-7/+19
| | | | Try "tcc -E -c tccasm.c -o tccasm.o"
* .i as file extensionseyko2015-01-061-1/+1
| | | | | | | | | | | Add a ".i" extension as alias for ".c" GCC and file extensions: .i C source code which should not be preprocessed. Before a patch: ./tcc -E tccasm.c -o tccasm.i ./tcc -c tccasm.i -o tccasm.o tccasm.i:1: error: unrecognized file type
* round() in test (24_math_library) fail because there are no defs included.seyko2015-01-051-0/+2
| | | | gcc complain but work right and tcc simply fail to compile right.
* crt1.c revisionCarlos Montiers2014-12-301-23/+53
|
* Fix parsing of binary floating point numberLee Duhem2014-12-154-2/+133
| | | | | | | * tccpp.c (parse_number): `shift' should be 1 while parsing binary floating point number. * tests/tests2/70_floating_point_literals.c: New test cases for floating point number parsing.
* tcc.h (BufferedFile): Remove unnecessary static memory allocationLee Duhem2014-12-111-1/+1
| | | | | The memory needed by `buffer' will be allocated in `tcc_open_bf', these is no need to allocate them in BufferedFile statically.
* libtcc.c (put_extern_sym2): Extend the scope of buf to match its useLee Duhem2014-12-111-2/+1
| | | | | After leaving the code block that `buf' is defined, `buf' will not exist, so `name' will point to a variable that does not exist.
* .gitignore: Ignore Emacs temporary filesLee Duhem2014-12-111-1/+2
|
* Makefile: Add rules to create tags and TAGS.Lee Duhem2014-11-281-2/+9
|
* .gitignore: Ignore generated files.Lee Duhem2014-11-281-0/+4
|
* little optimization to crt1Carlos Montiers2014-11-231-5/+6
|
* __getmainargs compatibility checking successCarlos Montiers2014-11-221-10/+14
|
* win32: fix implicit function warningJames Buren2014-11-031-0/+2
| | | | | This includes windows.h to fix a warning about an implicit function usage of ExitProcess().
* Filter-out warning about softfloat in tests2Matteo Cypriani2014-10-171-2/+2
|
* tccgen: use lvalue as result from bitfield assignmentgrischka2014-09-231-7/+5
| | | | | | | | | | | | | | | | | | | test case: #include <stdio.h> int main(int argc, char **argv) { struct _s { unsigned a:9, b:5, c:7; } _s, *s = &_s; int n = 250; s->a = s->b = s->c = n + 4; printf("--> %d / %d / %d\n", s->a, s->b, s->c); return 0; } before: --> 254 / 30 / 126 now: --> 30 / 30 / 126
* Accept CPPFLAGS from the environmentMatteo Cypriani2014-09-071-1/+1
| | | | | | | Don't override CPPFLAGS so that it can be passed through the environment. (This is a patch Thomas Preud'homme wrote for Debian in February 2013.)
* tccelf: layout_sections: add missing param strsecMatteo Cypriani2014-09-071-3/+4
| | | | This fixes compilation on (k)FreeBSD.
* Clear CFLAGS & LDFLAGS in testsMatteo Cypriani2014-09-072-0/+8
| | | | | | Clear CFLAGS and LDFLAGS to build the tests, in case the main Makefile passes some flags that aren't handled by tcc (we are not compiling tcc here, we are using tcc to compile the tests).
* Don't build libtcc1 with -fstack-protector-strongMatteo Cypriani2014-09-071-0/+4
| | | | | | | Prevent libtcc1.a to be compiled with -fstack-protector-strong, so that linking with tcc doesn't fail because symbol '__stack_chk_fail_local' is not present in libtcc1.a. This is useful only if the CFLAGS passed from the main Makefile contain this flag.
* tccgen: nocode_wanted: do not output constantsgrischka2014-08-012-16/+18
| | | | | | | | | | | | | | | | | | | | This for example suppresses string constants such as with int main() { return sizeof "foo"; } Actually, setting nocode_wanted = 1; in libtcc.c for the initial global level seemed wrong, since obviously "nocode_wanted" means code as any side effects, also such as string constants. This reverts a part of 2de1b2d14cc920e2c698ff0086f5558c2da7f569 (documented as "Some in-between fixes" in Changelog)
* win64: fix resource file supportgrischka2014-08-012-31/+33
|
* Removed the error message and minor changes.Carlos Montiers2014-07-171-9/+11
|
* __getmainargs return int, not void, and on error, it return -1 and let argv ↵Carlos Montiers2014-07-161-2/+7
| | | | untouched, also argc. Added a if checking the result of it.
* Fix mistake. Change jb by jbe. tiny c round (INT_MAX = 0x7FFFFFFF) to a ↵Carlos Montiers2014-07-103-3/+3
| | | | DWORD boundary and it becomes 0x80000000. Jle treats as -214783648, but Jbe treats as 214783648. Thanks to Jason Hood for explain me this.
* Fix problem using alloca function, executable crashed even with a exception ↵Carlos Montiers2014-07-103-6/+6
| | | | handler function, when try to allocate INT_MAX. Patch provided by Jason Hood in private e-mail, when I ask to him for help. He say: Feel free to pass it on to the mailing list.
* Rename:jiang2014-07-017-6/+6
| | | | | | 68_macro_concat.c -> 68_macro_param_list_err_1.c 69_macro_concat.c -> 69_macro_param_list_err_2.c and Remove spaces
* Specify license of lib/armeabi.cThomas Preud'homme2014-07-011-0/+21
|
* bug:jiang2014-06-296-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- #define hexCh(c (c >= 10 ? 'a' + c - 10 : '0' + c) hexCh(c); out: jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" (c >= 10 ? 'a' + c - 10 : '0' + c); --------------------------------------------------------------- #define hexCh(c/3) (c >= 10 ? 'a' + c - 10 : '0' + c) hexCh(c); out: jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" /3) (c >= 10 ? 'a' + c - 10 : '0' + c); jiang@jiang:~/test$ after patch: # 1 "c4.c" c4.c:1: error: may not appear in macro parameter list: "(" jiang@jiang:~/test$ jiang@jiang:~/test$ ./tcc -E c4.c # 1 "c4.c" c4.c:1: error: may not appear in macro parameter list: "/" jiang@jiang:~/test$
* Revert the many un-reviewed commits starting from early AprilDavid Mertens2014-06-240-0/+0
|\ | | | | | | | | | | | | Starting early April, a number of commits were pushed to the mob branch that did not reflect the interest, wishes, or code quality of the tcc community. This commit reverts those commits, while cherry-picking grishka's commit for win64 linkage issues.
| * revert vstore()jiang2014-06-231-0/+8
| |
| * Revert "Win: Enable use "*.def + *.c" files as library instead of *.a by ↵Thomas Coudray2014-06-201-9/+2
| | | | | | | | | | | | "-l" option" This reverts commit 7a3f6d49415fd5f1fa99d25aba40c7884d5774a4.
| * Win: Enable use "*.def + *.c" files as library instead of *.a by "-l" optionYX Hao2014-06-161-2/+9
| | | | | | | | | | | | | | | | example: "-lshell32" will try "shell32.def + shell32.c" Add lib type "%s/%s.c" for tcc_add_library() ('-l' option parse) So tcc can use all files as scripts.
| * Let init_putz one-time generation.jiang2014-05-281-51/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the same time, increase the GCC style warning --------------------------------------------------------------------------- int main() { int a[10] = {[5]=5}; return 0; } Disassembly of section .text: 0000000000000000 <main>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 81 ec 30 00 00 00 sub $0x30,%rsp b: b8 05 00 00 00 mov $0x5,%eax 10: 89 45 ec mov %eax,-0x14(%rbp) 13: 48 b8 14 00 00 00 00 movabs $0x14,%rax 1a: 00 00 00 1d: 49 89 c2 mov %rax,%r10 20: b8 00 00 00 00 mov $0x0,%eax 25: 48 89 c6 mov %rax,%rsi 28: 48 8d 45 d8 lea -0x28(%rbp),%rax 2c: 48 89 c7 mov %rax,%rdi 2f: 4c 89 d2 mov %r10,%rdx 32: b8 00 00 00 00 mov $0x0,%eax 37: e8 fc ff ff ff callq 38 <main+0x38> 3c: 48 b8 10 00 00 00 00 movabs $0x10,%rax 43: 00 00 00 46: 49 89 c2 mov %rax,%r10 49: b8 00 00 00 00 mov $0x0,%eax 4e: 48 89 c6 mov %rax,%rsi 51: 48 8d 45 f0 lea -0x10(%rbp),%rax 55: 48 89 c7 mov %rax,%rdi 58: 4c 89 d2 mov %r10,%rdx 5b: b8 00 00 00 00 mov $0x0,%eax 60: e8 fc ff ff ff callq 61 <main+0x61> 65: b8 00 00 00 00 mov $0x0,%eax 6a: e9 00 00 00 00 jmpq 6f <main+0x6f> 6f: c9 leaveq 70: c3 retq After the patch 0000000000000000 <main>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 81 ec 30 00 00 00 sub $0x30,%rsp b: 48 b8 28 00 00 00 00 movabs $0x28,%rax 12: 00 00 00 15: 49 89 c2 mov %rax,%r10 18: b8 00 00 00 00 mov $0x0,%eax 1d: 48 89 c6 mov %rax,%rsi 20: 48 8d 45 d8 lea -0x28(%rbp),%rax 24: 48 89 c7 mov %rax,%rdi 27: 4c 89 d2 mov %r10,%rdx 2a: b8 00 00 00 00 mov $0x0,%eax 2f: e8 fc ff ff ff callq 30 <main+0x30> 34: b8 05 00 00 00 mov $0x5,%eax 39: 89 45 ec mov %eax,-0x14(%rbp) 3c: b8 00 00 00 00 mov $0x0,%eax 41: e9 00 00 00 00 jmpq 46 <main+0x46> 46: c9 leaveq 47: c3 retq ----------------------------------------------------------------------------------- "c5.c" int main() { // union st struct st { char c; short s; // char cc[]; }; // union st struct st ss = { 1, 2, 3}; // int a = ss; char cb[1] = {1,2,3}; return 0; } c5.c:12: warning: excess elements in struct initializer c5.c:14: warning: excess elements in array initializer c5.c:14: warning: excess elements in array initializer
| * Considering the effect of CH_EOF on line_numjiang2014-05-281-1/+1
| |
| * Modify the 66_macro_concat_end.expectjiang2014-05-281-1/+1
| | | | | | | | I was busy recently, forget test. Thank Austin
| * The number of rows to display warning is wrongjiang2014-05-231-2/+5
| | | | | | | | | | | | | | | | For example: #define TOK_ASM_weak TOK_WEAK1 #define TOK_ASM_weak TOK_WEAK Output: C8.c:3: warning: TOK_ASM_weak redefined
| * forget Delete __va_ld_regjiang2014-05-211-1/+1
| |
| * Delete a = (a > = 0)? A: -a; \jiang2014-05-202-26/+40
| |
| * clean '\t'jiang2014-05-202-275/+275
| |
| * In the local use of local stack, use a global stack in the global timejiang2014-05-201-1/+1
| |