aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* int main()jiang2014-05-171-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | { struct st { int aa:16; int bb:16; } s; s.aa = 1; s.bb = 2; return 0; } objdump -d: elf64-x86-64 Disassembly of section .text: 0000000000000000 <main>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 81 ec 10 00 00 00 sub $0x10,%rsp b: b8 01 00 00 00 mov $0x1,%eax 10: 48 89 c1 mov %rax,%rcx 13: 81 e1 ff ff 00 00 and $0xffff,%ecx 19: 8b 55 fc mov -0x4(%rbp),%edx 1c: 81 e2 00 00 ff ff and $0xffff0000,%edx 22: 09 d1 or %edx,%ecx 24: 89 4d fc mov %ecx,-0x4(%rbp) 27: b8 02 00 00 00 mov $0x2,%eax 2c: 48 89 c1 mov %rax,%rcx 2f: 81 e1 ff ff 00 00 and $0xffff,%ecx 35: c1 e1 10 shl $0x10,%ecx 38: 8b 55 fc mov -0x4(%rbp),%edx 3b: 81 e2 ff ff 00 00 and $0xffff,%edx 41: 09 d1 or %edx,%ecx 43: 89 4d fc mov %ecx,-0x4(%rbp) 46: b8 00 00 00 00 mov $0x0,%eax 4b: e9 00 00 00 00 jmpq 50 <main+0x50> 50: c9 leaveq 51: c3 retq After the patch Disassembly of section .text: 0000000000000000 <main>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 81 ec 10 00 00 00 sub $0x10,%rsp b: 8b 45 fc mov -0x4(%rbp),%eax e: 81 e0 00 00 ff ff and $0xffff0000,%eax 14: 83 c8 01 or $0x1,%eax 17: 89 45 fc mov %eax,-0x4(%rbp) 1a: 8b 45 fc mov -0x4(%rbp),%eax 1d: 81 e0 ff ff 00 00 and $0xffff,%eax 23: 81 c8 00 00 02 00 or $0x20000,%eax 29: 89 45 fc mov %eax,-0x4(%rbp) 2c: b8 00 00 00 00 mov $0x0,%eax 31: e9 00 00 00 00 jmpq 36 <main+0x36> 36: c9 leaveq 37: c3 retq
* Improved '\ n' output effect (# pragma pack (push, 8), # pragma pack (pop))jiang2014-05-171-3/+3
|
* 1 macro_push and macro_pop work I made a mistake, no matter the definition ↵jiang2014-05-173-32/+40
| | | | | | | | does not define can be macro_push. And the modified tcctest.c test 2, pack: in the compiler under the mode of s1->ppfp, I have no clear ideas1->ppfp Some advice thank you Roy to me.This patch, I hope I can pass the Roy test
* add push_macro test againjiang2014-05-162-1/+14
|
* fix push_macro, asked Tom to help me testfix push_macrojiang2014-05-163-3/+10
|
* When tcc.exe update, abitest-tcc.exe not updated. For security, you must ↵jiang2014-05-151-1/+1
| | | | first clean up
* Add warning 4jiang2014-05-141-5/+29
| | | | | | | | num en{a1,a2,a3}; enum en ee; ee = 0xffffffffff; char a; a = 0xffff;
* Add warning 3jiang2014-05-141-0/+2
| | | | | | struct st {int a;} ss; int b; b = ss;
* clean '\t'jiang2014-05-145-177/+177
|
* restore 2dd8587c2f32d17a2cd0443a60a614a3fa9bbe29jiang2014-05-136-111/+248
|
* Modify tcc_error ("invalid type",);jiang2014-05-131-1/+1
|
* fix 14d0aa450f9a926a852ea01fbdecf27425264d14jiang2014-05-131-1/+1
|
* Add warning 2jiang2014-05-091-0/+2
| | | | | | | | | For example: struct A { int b: 16; int c: 16 }; sizeof (struct A);
* Add warningjiang2014-05-091-0/+2
| | | | | | | For example: struct A { int b []; };
* win64: try to fix linkagegrischka2014-05-083-18/+23
| | | | | | | | | - revert to R_X86_64_PC32 for near calls on PE - revert to s1->section_align set to zero by default Untested. Compared to release_0_9_26 the pe-image looks back to normal. There are some differences in dissassembly (r10/r11 usage) but maybe that's ok.
* fix bug if (seen_reg_num + reg_count <= 8)jiang2014-05-081-1/+1
|
* Revert "update static void parse_number()"grischka2014-05-062-138/+247
| | | | | | | | | | | | | | | | | | | because: - Constructing fp numbers isn't quite trivial - 3 additional calls to strchr per number is noticeable slow Also: exclude abitest.c:ret_longdouble_test2 on _WIN32 for mixed gcc/tcc scenario test case: - make -k test (on win32): -2.120000 0.500000 23000000000.000000 +2.120000 0.500000 22999999999.999996 ... ret_longdouble_test2... failure This reverts 857f7dbfa65179e6690dbee7ab915fb4458cee11 and deaee6c2496ecb25858290405fef8ef79aece979
* Return to: e20c1eb99e1003c1e59522c136dbb15c52d7cc7cjiang2014-05-0423-1809/+1411
| | | | | | | | | | | | | | | | | | | | | | | 1: The new patch for the other machines still have the problem. 2: libcrt Rename (what if gcc had libcrt as well) 3: parse_number exact problem 4: VT_VLS is to allow tcc Compile the following int b = 9; struct st { int a; int b [b] }; struct st st1; st1.b [8] = 9; printf ("% d \ n", st1.b [8]); tcc a problem. Due to problems in front, and now can not be improved 5: they commit much, bug difficult to lock, you can not let other people help develop. 6: ('\ t') too Thanks to Michael and Ray Their criticism I have benefited!
* tcc on i386 are still having problems at work.Thank Roy report again. Struck ↵jiang2014-05-036-38/+32
| | | | on several variables can be connected to commit in the register. I am worried whether tcc can run the os. Since my machine is ubuntu 64 bits I can test my machine.
* forget commit tccge.c for i386jiang2014-05-031-1/+1
|
* Modify i386-gen.c,jiang2014-05-031-54/+113
| | | | Thank Roy Tam reported problems
* Fix x86-64 vlajiang2014-05-023-190/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, it should look like this High stack ------------- ----- Func_ret_sub ------------ ---- Vla stack ------------- ---- Known loc -------------- Low Increased loc_stack () function is used for temporary stack management, call save_reg (), released by load () Like this Before use High ----- Known loc ---- --- ---- ---- Pop_stack Low loc_stack (size, 1) After use High ----- Known loc ---- Pop_stack --- ---- ---- Low
* Fixes include the double quotes bugjiang2014-05-026-111/+248
| | | | | Added push_macro, pop_macro support Fix pack bug, when output with-E will pack the bug
* gen_putz () and struct_copy (), is to reduce the third-party call thatjiang2014-05-021-23/+30
| | | | | | | generates faster code tcc Now only for x86-64 parse_number also to reduce the reliance on third-party libraries, allowing faster analysis tcc
* Add a comment.jiang2014-05-021-3/+3
| | | | | | ref: 2a8905c93b4f67a21e3dbf297c3e93c598831528 Sorry, I used the wrong command, I did not mean it. Thank grischka
* Attention: never use hard tabs other than 8 (eight) widegrischka2014-05-011-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | The attached fix (libcrt.c) is just one example. There seem many more such introduced from latest commits that look badly formatted in anyone else's editors and should be fixed. General recommended policy: - if possible, do not add new hard tabs ('\t') at all. Use spaces (soft tabs) instead - in any case, configure your editor to read/write hard tabs with width of 8 (eight) Also: - Avoid merge commits (unless for very good reason). Instead use "git cherry-pick" or "git rebase" to put your commits on top of the public branch. ref: 2a8905c93b4f67a21e3dbf297c3e93c598831528 Also: - jiang: please explain what you are doing, in the commit message and on the list. Subscribe to the mailing list to receive feedback from people for your work. For example, what was wrong with 'parse_number'? Show a test case and how your version fixes it (it is slower btw).
* update for x86_64-gen.cjiang2014-05-014-326/+304
|
* cleanjiang2014-05-011-9/+0
|
* fix its own making bug. Improved init_putz (). Modify the tests / Makefile ↵jiang2014-05-014-51/+67
| | | | to make the test more secure
* Expansion code again for x86_64-genjiang2014-05-013-201/+129
|
* 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
| |