aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--TODO8
-rw-r--r--tcc-doc.texi45
3 files changed, 29 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 0abaa63..47494f0 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ CFLAGS+=-m386 -malign-functions=0
CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"
DISAS=objdump -d
INSTALL=install
-VERSION=0.9.11
+VERSION=0.9.12
# run local version of tcc with local libraries and includes
TCC=./tcc -B. -I.
diff --git a/TODO b/TODO
index c8a092a..4993610 100644
--- a/TODO
+++ b/TODO
@@ -1,11 +1,12 @@
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
-- 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)
- suppress unneeded hash table for Symbols (= compile even faster)
+- add alloca()
- ignore at least asm extension
- setjmp is not supported properly in bound checking.
- better local variables handling (needed for other targets)
@@ -13,7 +14,6 @@ TODO list:
only for local arrays).
- To check: bound checking and float/long long/struct copy code. bound
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)
Not critical:
diff --git a/tcc-doc.texi b/tcc-doc.texi
index d9abd16..9c300f1 100644
--- a/tcc-doc.texi
+++ b/tcc-doc.texi
@@ -658,24 +658,20 @@ index (@code{REG_xxx} constants), but additionnal values and flags are
defined:
@example
-#define VT_CONST 0x00f0 /* constant in vc
- (must be first non register value) */
-#define VT_LLOCAL 0x00f1 /* lvalue, offset on stack */
-#define VT_LOCAL 0x00f2 /* offset on stack */
-#define VT_CMP 0x00f3 /* the value is stored in processor flags (in vc) */
-#define VT_JMP 0x00f4 /* value is the consequence of jmp true (even) */
-#define VT_JMPI 0x00f5 /* value is the consequence of jmp false (odd) */
-#define VT_LVAL 0x0100 /* var is an lvalue */
-#define VT_FORWARD 0x0200 /* value is forward reference */
-#define VT_MUSTCAST 0x0400 /* value must be casted to be correct (used for
- char/short stored in integer registers) */
-#define VT_MUSTBOUND 0x0800 /* bound checking must be done before
- dereferencing value */
-#define VT_BOUNDED 0x8000 /* value is bounded. The address of the
- 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_CONST 0x00f0
+#define VT_LLOCAL 0x00f1
+#define VT_LOCAL 0x00f2
+#define VT_CMP 0x00f3
+#define VT_JMP 0x00f4
+#define VT_JMPI 0x00f5
+#define VT_LVAL 0x0100
+#define VT_SYM 0x0200
+#define VT_MUSTCAST 0x0400
+#define VT_MUSTBOUND 0x0800
+#define VT_BOUNDED 0x8000
+#define VT_LVAL_BYTE 0x1000
+#define VT_LVAL_SHORT 0x2000
+#define VT_LVAL_UNSIGNED 0x4000
#define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED)
@end example
@@ -692,7 +688,10 @@ stack.
@item VT_CMP
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
-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
@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
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
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
@@ -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
is used (lazy casting).
-@item VT_FORWARD
-indicates that the value is a forward reference to a variable or a function.
+@item VT_SYM
+indicates that the symbol @code{SValue.sym} must be added to the constant.
@item VT_MUSTBOUND
@itemx VT_BOUNDED