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 | mov %eax, %ecx | 17 | mov %eax, %ecx |
| 18 | test %eax,%eax | 18 | test %eax,%eax |
| 19 | jz p6 | 19 | jz p6 |
| 20 | add $15+1,%eax | 20 | add $3 + 1,%eax |
| 21 | and $-16,%eax | 21 | and $-4,%eax |
| 22 | 22 | ||
| 23 | #ifdef _WIN32 | 23 | #ifdef _WIN32 |
| 24 | p4: | 24 | p4: |
| 25 | cmp $4096,%eax | 25 | cmp $4096,%eax |
| 26 | jbe p5 | 26 | jb p5 |
| 27 | test %eax,-4096(%esp) | 27 | test %eax,-4096(%esp) |
| 28 | sub $4096,%esp | 28 | sub $4096,%esp |
| 29 | sub $4096,%eax | 29 | sub $4096,%eax |
| @@ -33,7 +33,6 @@ p5: · 3 unmodified lines | |||
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | sub %eax,%esp | 35 | sub %eax,%esp |
| 36 | and $-16,%esp | ||
| 37 | mov %esp,%eax | 36 | mov %esp,%eax |
| 38 | 37 | ||
| 39 | push %edx | 38 | push %edx |
| @@ -72,12 +71,11 @@ _(__bound_alloca_nr): · 32 unmodified lines | |||
| 72 | #else | 71 | #else |
| 73 | pop %rdx | 72 | pop %rdx |
| 74 | mov %rdi,%rax | 73 | mov %rdi,%rax |
| 74 | and %eax,%eax | ||
| 75 | jz p3 | ||
| 75 | mov %rax,%rsi # size, a second parm to the __bound_new_region | 76 | mov %rax,%rsi # size, a second parm to the __bound_new_region |
| 76 | |||
| 77 | add $15 + 1,%rax # add one extra to separate regions | 77 | add $15 + 1,%rax # add one extra to separate regions |
| 78 | and $-16,%rax | 78 | and $-16,%rax |
| 79 | jz p3 | ||
| 80 | |||
| 81 | 79 | ||
| 82 | sub %rax,%rsp | 80 | sub %rax,%rsp |
| 83 | mov %rsp,%rdi # pointer, a first parm to the __bound_new_region | 81 | mov %rsp,%rdi # pointer, a first parm to the __bound_new_region |
| @@ -15,14 +15,14 @@ _(alloca): · 14 unmodified lines | |||
| 15 | _(__alloca): | 15 | _(__alloca): |
| 16 | pop %edx | 16 | pop %edx |
| 17 | pop %eax | 17 | pop %eax |
| 18 | add $15,%eax | 18 | add $3,%eax |
| 19 | and $-16,%eax | 19 | and $-4,%eax |
| 20 | jz p3 | 20 | jz p3 |
| 21 | 21 | ||
| 22 | #ifdef _WIN32 | 22 | #ifdef _WIN32 |
| 23 | p1: | 23 | p1: |
| 24 | cmp $4096,%eax | 24 | cmp $4096,%eax |
| 25 | jbe p2 | 25 | jb p2 |
| 26 | test %eax,-4096(%esp) | 26 | test %eax,-4096(%esp) |
| 27 | sub $4096,%esp | 27 | sub $4096,%esp |
| 28 | sub $4096,%eax | 28 | sub $4096,%eax |
| @@ -30,7 +30,6 @@ p1: · 1 unmodified line | |||
| 30 | p2: | 30 | p2: |
| 31 | #endif | 31 | #endif |
| 32 | sub %eax,%esp | 32 | sub %eax,%esp |
| 33 | and $-16,%esp | ||
| 34 | mov %esp,%eax | 33 | mov %esp,%eax |
| 35 | p3: | 34 | p3: |
| 36 | push %edx | 35 | push %edx |
| @@ -55,7 +54,7 @@ _(alloca): · 18 unmodified lines | |||
| 55 | #ifdef _WIN32 | 54 | #ifdef _WIN32 |
| 56 | p1: | 55 | p1: |
| 57 | cmp $4096,%rax | 56 | cmp $4096,%rax |
| 58 | jbe p2 | 57 | jb p2 |
| 59 | test %rax,-4096(%rsp) | 58 | test %rax,-4096(%rsp) |
| 60 | sub $4096,%rsp | 59 | sub $4096,%rsp |
| 61 | sub $4096,%rax | 60 | sub $4096,%rax |