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
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: 2a8905c93b
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).
As per grischka comment, always output a space after macro concatenation
instead of trying to detect if it's necessary as the current approach
has a huge cost.
This adds parsing of (GCC compatible) visibility attribute
in order to mark selected global symbols as hidden. The generated
.o files contain hidden symbols already, the TCC linker doesn't
yet do the right thing.
Not able to generate ELF files on NetBSD yet (lacks the note and crt1.o
is actually named crt0.o on NetBSD), but -run works with these extra
defines:
-D__lint__ -D"__symbolrename(x)=asm(#x)" -D__NetBSD__
The -D__lint__ is an ugly hack, TCC should be able to emulate GCC just
fine, but it seems TCC doesn't support __builtin_va_list yet?
typedef __builtin_va_list __va_list;
/usr/include/sys/ansi.h:72: error: ';' expected (got "__va_list")
- remove -norunsrc switch
Meaning and usage (-run -norun...???) look sort of screwed. Also
general usefulness is unclear, so it was actually to support exactly
one (not even very interesting) test
This partially reverts e31579b076