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
17 mov %eax, %ecx17 mov %eax, %ecx
18 test %eax,%eax18 test %eax,%eax
19 jz p619 jz p6
20 add $15+1,%eax20 add $3 + 1,%eax
21 and $-16,%eax21 and $-4,%eax
22 22
23#ifdef _WIN3223#ifdef _WIN32
24p4:24p4:
25 cmp $4096,%eax25 cmp $4096,%eax
26 jbe p526 jb p5
27 test %eax,-4096(%esp)27 test %eax,-4096(%esp)
28 sub $4096,%esp28 sub $4096,%esp
29 sub $4096,%eax29 sub $4096,%eax
@@ -33,7 +33,6 @@ p5: · 3 unmodified lines
33#endif33#endif
34 34
35 sub %eax,%esp35 sub %eax,%esp
36 and $-16,%esp
37 mov %esp,%eax36 mov %esp,%eax
38 37
39 push %edx38 push %edx
@@ -72,12 +71,11 @@ _(__bound_alloca_nr): · 32 unmodified lines
72#else71#else
73 pop %rdx72 pop %rdx
74 mov %rdi,%rax73 mov %rdi,%rax
74 and %eax,%eax
75 jz p3
75 mov %rax,%rsi # size, a second parm to the __bound_new_region76 mov %rax,%rsi # size, a second parm to the __bound_new_region
76
77 add $15 + 1,%rax # add one extra to separate regions77 add $15 + 1,%rax # add one extra to separate regions
78 and $-16,%rax78 and $-16,%rax
79 jz p3
80
81 79
82 sub %rax,%rsp80 sub %rax,%rsp
83 mov %rsp,%rdi # pointer, a first parm to the __bound_new_region81 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
15_(__alloca):15_(__alloca):
16 pop %edx16 pop %edx
17 pop %eax17 pop %eax
18 add $15,%eax18 add $3,%eax
19 and $-16,%eax19 and $-4,%eax
20 jz p320 jz p3
21 21
22#ifdef _WIN3222#ifdef _WIN32
23p1:23p1:
24 cmp $4096,%eax24 cmp $4096,%eax
25 jbe p225 jb p2
26 test %eax,-4096(%esp)26 test %eax,-4096(%esp)
27 sub $4096,%esp27 sub $4096,%esp
28 sub $4096,%eax28 sub $4096,%eax
@@ -30,7 +30,6 @@ p1: · 1 unmodified line
30p2:30p2:
31#endif31#endif
32 sub %eax,%esp32 sub %eax,%esp
33 and $-16,%esp
34 mov %esp,%eax33 mov %esp,%eax
35p3:34p3:
36 push %edx35 push %edx
@@ -55,7 +54,7 @@ _(alloca): · 18 unmodified lines
55#ifdef _WIN3254#ifdef _WIN32
56p1:55p1:
57 cmp $4096,%rax56 cmp $4096,%rax
58 jbe p257 jb p2
59 test %rax,-4096(%rsp)58 test %rax,-4096(%rsp)
60 sub $4096,%rsp59 sub $4096,%rsp
61 sub $4096,%rax60 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