tcc.c: - be nice to leak checkers tcctools.c: - remove unused TCCState params tccrun.c: - call bound_exit() after signals to let it free mem tccelf.c: - use section_add() instead of section_ptr_add() when more appropriate tccpp.c: - use size_t to align tal_header naturally - 'POINTER_SIZE' and 'PTR_SIZE' in the same source is confusing - "char file_name[TAL_DEBUG_FILE_LEN + 1];" looks silly. - next_nomacro(): skip UTF8 BOM at BOF tccgen.c: - get rid of STMT_EXPR clause on top of block - warn with useless type like 'int;' - move skip()'s in block() for better error line-info - BIT_SIZE bits are meaningful only with VT_BITFIELD (not with enums for example) workflow/test-win32: - build with MSVC using build-tcc.bat also alloca.S: - fix 'off by one' problem on win32 (must touch current page too because the 'push %edx' at the end could touch the next page) - must not align greater than 4 when used for struct args (i386-gen.c:gfunc_call()) libtcc.c: - accept -g1dwarf (dwarf output, only line info)
Showing the changes to lib (2 of 17 files). Show all
Unified · Split
| @@ -17,13 +17,13 @@ _(__bound_alloca): · 16 unmodified lines | ||
| 17 | 17 | mov %eax, %ecx |
| 18 | 18 | test %eax,%eax |
| 19 | 19 | jz p6 |
| 20 | − add $15+1,%eax | |
| 21 | − and $-16,%eax | |
| 20 | + add $3 + 1,%eax | |
| 21 | + and $-4,%eax | |
| 22 | 22 | |
| 23 | 23 | #ifdef _WIN32 |
| 24 | 24 | p4: |
| 25 | 25 | cmp $4096,%eax |
| 26 | − jbe p5 | |
| 26 | + jb p5 | |
| 27 | 27 | test %eax,-4096(%esp) |
| 28 | 28 | sub $4096,%esp |
| 29 | 29 | sub $4096,%eax |
| @@ -33,7 +33,6 @@ p5: · 3 unmodified lines | ||
| 33 | 33 | #endif |
| 34 | 34 | |
| 35 | 35 | sub %eax,%esp |
| 36 | − and $-16,%esp | |
| 37 | 36 | mov %esp,%eax |
| 38 | 37 | |
| 39 | 38 | push %edx |
| @@ -72,12 +71,11 @@ _(__bound_alloca_nr): · 32 unmodified lines | ||
| 72 | 71 | #else |
| 73 | 72 | pop %rdx |
| 74 | 73 | mov %rdi,%rax |
| 74 | + and %eax,%eax | |
| 75 | + jz p3 | |
| 75 | 76 | mov %rax,%rsi # size, a second parm to the __bound_new_region |
| 76 | − | |
| 77 | 77 | add $15 + 1,%rax # add one extra to separate regions |
| 78 | 78 | and $-16,%rax |
| 79 | − jz p3 | |
| 80 | − | |
| 81 | 79 | |
| 82 | 80 | sub %rax,%rsp |
| 83 | 81 | mov %rsp,%rdi # pointer, a first parm to the __bound_new_region |
| @@ -15,14 +15,14 @@ _(alloca): · 14 unmodified lines | ||
| 15 | 15 | _(__alloca): |
| 16 | 16 | pop %edx |
| 17 | 17 | pop %eax |
| 18 | − add $15,%eax | |
| 19 | − and $-16,%eax | |
| 18 | + add $3,%eax | |
| 19 | + and $-4,%eax | |
| 20 | 20 | jz p3 |
| 21 | 21 | |
| 22 | 22 | #ifdef _WIN32 |
| 23 | 23 | p1: |
| 24 | 24 | cmp $4096,%eax |
| 25 | − jbe p2 | |
| 25 | + jb p2 | |
| 26 | 26 | test %eax,-4096(%esp) |
| 27 | 27 | sub $4096,%esp |
| 28 | 28 | sub $4096,%eax |
| @@ -30,7 +30,6 @@ p1: · 1 unmodified line | ||
| 30 | 30 | p2: |
| 31 | 31 | #endif |
| 32 | 32 | sub %eax,%esp |
| 33 | − and $-16,%esp | |
| 34 | 33 | mov %esp,%eax |
| 35 | 34 | p3: |
| 36 | 35 | push %edx |
| @@ -55,7 +54,7 @@ _(alloca): · 18 unmodified lines | ||
| 55 | 54 | #ifdef _WIN32 |
| 56 | 55 | p1: |
| 57 | 56 | cmp $4096,%rax |
| 58 | − jbe p2 | |
| 57 | + jb p2 | |
| 59 | 58 | test %rax,-4096(%rsp) |
| 60 | 59 | sub $4096,%rsp |
| 61 | 60 | sub $4096,%rax |