This commit is contained in:
bellard 2002-09-08 22:13:54 +00:00
parent 3748975feb
commit 10f5d44f43
3 changed files with 29 additions and 26 deletions

View file

@ -12,7 +12,7 @@ CFLAGS+=-m386 -malign-functions=0
CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\" CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"
DISAS=objdump -d DISAS=objdump -d
INSTALL=install INSTALL=install
VERSION=0.9.11 VERSION=0.9.12
# run local version of tcc with local libraries and includes # run local version of tcc with local libraries and includes
TCC=./tcc -B. -I. TCC=./tcc -B. -I.

8
TODO
View file

@ -1,11 +1,12 @@
TODO list: TODO list:
- To fix: 'sizeof' generates code if too complex expression is given.
- add gcc extension typeof()
- add gcc extension __alignof__()
- fix constant error msg - fix constant error msg
- add alloca()
- add typeof()
- add checks for multiple including of same file (= compile even faster)
- add 'CType' structure to optimize type handling (= compile even faster) - add 'CType' structure to optimize type handling (= compile even faster)
- suppress unneeded hash table for Symbols (= compile even faster) - suppress unneeded hash table for Symbols (= compile even faster)
- add alloca()
- ignore at least asm extension - ignore at least asm extension
- setjmp is not supported properly in bound checking. - setjmp is not supported properly in bound checking.
- better local variables handling (needed for other targets) - better local variables handling (needed for other targets)
@ -13,7 +14,6 @@ TODO list:
only for local arrays). only for local arrays).
- To check: bound checking and float/long long/struct copy code. bound - To check: bound checking and float/long long/struct copy code. bound
checking and symbol + offset optimization checking and symbol + offset optimization
- To fix: 'sizeof' generate code if too complex expression is given.
- free all allocated data and use longjmp for errors (useful for libtcc use) - free all allocated data and use longjmp for errors (useful for libtcc use)
Not critical: Not critical:

View file

@ -658,24 +658,20 @@ index (@code{REG_xxx} constants), but additionnal values and flags are
defined: defined:
@example @example
#define VT_CONST 0x00f0 /* constant in vc #define VT_CONST 0x00f0
(must be first non register value) */ #define VT_LLOCAL 0x00f1
#define VT_LLOCAL 0x00f1 /* lvalue, offset on stack */ #define VT_LOCAL 0x00f2
#define VT_LOCAL 0x00f2 /* offset on stack */ #define VT_CMP 0x00f3
#define VT_CMP 0x00f3 /* the value is stored in processor flags (in vc) */ #define VT_JMP 0x00f4
#define VT_JMP 0x00f4 /* value is the consequence of jmp true (even) */ #define VT_JMPI 0x00f5
#define VT_JMPI 0x00f5 /* value is the consequence of jmp false (odd) */ #define VT_LVAL 0x0100
#define VT_LVAL 0x0100 /* var is an lvalue */ #define VT_SYM 0x0200
#define VT_FORWARD 0x0200 /* value is forward reference */ #define VT_MUSTCAST 0x0400
#define VT_MUSTCAST 0x0400 /* value must be casted to be correct (used for #define VT_MUSTBOUND 0x0800
char/short stored in integer registers) */ #define VT_BOUNDED 0x8000
#define VT_MUSTBOUND 0x0800 /* bound checking must be done before #define VT_LVAL_BYTE 0x1000
dereferencing value */ #define VT_LVAL_SHORT 0x2000
#define VT_BOUNDED 0x8000 /* value is bounded. The address of the #define VT_LVAL_UNSIGNED 0x4000
bounding function call point is in vc */
#define VT_LVAL_BYTE 0x1000 /* lvalue is a byte */
#define VT_LVAL_SHORT 0x2000 /* lvalue is a short */
#define VT_LVAL_UNSIGNED 0x4000 /* lvalue is unsigned */
#define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED) #define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED)
@end example @end example
@ -692,7 +688,10 @@ stack.
@item VT_CMP @item VT_CMP
indicates that the value is actually stored in the CPU flags (i.e. the indicates that the value is actually stored in the CPU flags (i.e. the
value is the consequence of a test). The value is either 0 or 1. The value is the consequence of a test). The value is either 0 or 1. The
actual CPU flags used is indicated in @code{SValue.c.i}. actual CPU flags used is indicated in @code{SValue.c.i}.
If any code is generated which destroys the CPU flags, this value MUST be
put in a normal register.
@item VT_JMP @item VT_JMP
@itemx VT_JMPI @itemx VT_JMPI
@ -702,6 +701,10 @@ indicates that the value is the consequence of a jmp. For VT_JMP, it is
These values are used to compile the @code{||} and @code{&&} logical These values are used to compile the @code{||} and @code{&&} logical
operators. operators.
If any code is generated, this value MUST be put in a normal
register. Otherwise, the generated code won't be executed if the jump is
taken.
@item VT_LVAL @item VT_LVAL
is a flag indicating that the value is actually an lvalue (left value of is a flag indicating that the value is actually an lvalue (left value of
an assignment). It means that the value stored is actually a pointer to an assignment). It means that the value stored is actually a pointer to
@ -724,8 +727,8 @@ ASAP because its semantics are rather complicated.
indicates that a cast to the value type must be performed if the value indicates that a cast to the value type must be performed if the value
is used (lazy casting). is used (lazy casting).
@item VT_FORWARD @item VT_SYM
indicates that the value is a forward reference to a variable or a function. indicates that the symbol @code{SValue.sym} must be added to the constant.
@item VT_MUSTBOUND @item VT_MUSTBOUND
@itemx VT_BOUNDED @itemx VT_BOUNDED