History

tcc.c:main() free all & etc...

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)

grischka committed 1 year ago

Commit deb7a3f1 parent 8845b6c17 files · +187 −162Browse files

Showing the changes to lib (2 of 17 files). Show all

Unified · Split

2 files
  1. lib/alloca-bt.S +5 −7
  2. lib/alloca.S +4 −5
lib/alloca-bt.S+5−7
@@ -17,13 +17,13 @@ _(__bound_alloca): · 16 unmodified lines
1717 mov %eax, %ecx
1818 test %eax,%eax
1919 jz p6
20− add $15+1,%eax
21− and $-16,%eax
20+ add $3 + 1,%eax
21+ and $-4,%eax
2222
2323 #ifdef _WIN32
2424 p4:
2525 cmp $4096,%eax
26− jbe p5
26+ jb p5
2727 test %eax,-4096(%esp)
2828 sub $4096,%esp
2929 sub $4096,%eax
@@ -33,7 +33,6 @@ p5: · 3 unmodified lines
3333 #endif
3434
3535 sub %eax,%esp
36− and $-16,%esp
3736 mov %esp,%eax
3837
3938 push %edx
@@ -72,12 +71,11 @@ _(__bound_alloca_nr): · 32 unmodified lines
7271 #else
7372 pop %rdx
7473 mov %rdi,%rax
74+ and %eax,%eax
75+ jz p3
7576 mov %rax,%rsi # size, a second parm to the __bound_new_region
76−
7777 add $15 + 1,%rax # add one extra to separate regions
7878 and $-16,%rax
79− jz p3
80−
8179
8280 sub %rax,%rsp
8381 mov %rsp,%rdi # pointer, a first parm to the __bound_new_region
lib/alloca.S+4−5
@@ -15,14 +15,14 @@ _(alloca): · 14 unmodified lines
1515 _(__alloca):
1616 pop %edx
1717 pop %eax
18− add $15,%eax
19− and $-16,%eax
18+ add $3,%eax
19+ and $-4,%eax
2020 jz p3
2121
2222 #ifdef _WIN32
2323 p1:
2424 cmp $4096,%eax
25− jbe p2
25+ jb p2
2626 test %eax,-4096(%esp)
2727 sub $4096,%esp
2828 sub $4096,%eax
@@ -30,7 +30,6 @@ p1: · 1 unmodified line
3030 p2:
3131 #endif
3232 sub %eax,%esp
33− and $-16,%esp
3433 mov %esp,%eax
3534 p3:
3635 push %edx
@@ -55,7 +54,7 @@ _(alloca): · 18 unmodified lines
5554 #ifdef _WIN32
5655 p1:
5756 cmp $4096,%rax
58− jbe p2
57+ jb p2
5958 test %rax,-4096(%rsp)
6059 sub $4096,%rsp
6160 sub $4096,%rax

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t