riscv: asm: implement `j offset`
[tinycc.git] / TODO
bloba09c193245020e51f1d3e08015558358663ef573
1 TODO list:
3 Releases:
5 - release tcc on a regular basis
7 Bugs:
9 - i386 fastcall is mostly wrong
10 - FPU st(0) is left unclean (kwisatz haderach). Incompatible with
11   optimized gcc/msc code
12 - see transparent union pb in /urs/include/sys/socket.h
13 - precise behaviour of typeof with arrays ? (__put_user macro)
14   but should suffice for most cases)
15 - handle '? x, y : z' in unsized variable initialization (',' is
16   considered incorrectly as separator in preparser)
17 - transform functions to function pointers in function parameters
18   (net/ipv4/ip_output.c)
19 - fix function pointer type display
20 - check section alignment in C
21 - fix invalid cast in comparison 'if (v == (int8_t)v)'
22 - finish varargs.h support (gcc 3.2 testsuite issue)
23 - fix static functions declared inside block
24 - fix multiple unions init
25 - make libtcc fully reentrant (except for the compilation stage itself).
26 - struct/union/enum definitions in nested scopes (see also Debian bug #770657)
27 - __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
28 - memory may be leaked after errors (longjmp).
30 Portability:
32 - it is assumed that int is 32-bit and sizeof(int) == 4
33 - int is used when host or target size_t would make more sense
34 - TCC handles target floating-point (fp) values using the host's fp
35   arithmetic, which is simple and fast but may lead to exceptions
36   and inaccuracy and wrong representations when cross-compiling
38 Linking:
40 - static linking (-static) does sort of work
41         works with musl libc
42         glibc requires libc.so even when statically linked (very bad, but not
43         up to tcc)
45 Bound checking:
47 - fix bound exit on RedHat 7.3
48 - setjmp is not supported properly in bound checking.
49 - fix bound check code with '&' on local variables (currently done
50   only for local arrays).
51 - bound checking and float/long long/struct copy code. bound
52   checking and symbol + offset optimization
54 Missing features:
56 - disable-asm and disable-bcheck options
57 - __builtin_expect()
58 - atexit (Nigel Horne)
59 - C99: add complex types (gcc 3.2 testsuite issue)
60 - postfix compound literals (see 20010124-1.c)
61 - interactive mode / integrated debugger
63 Optimizations:
65 - suppress specific anonymous symbol handling
66 - more parse optimizations (=even faster compilation)
67 - memory alloc optimizations (=even faster compilation)
68 - optimize VT_LOCAL + const
69 - better local variables handling (needed for other targets)
71 Not critical:
73 - C99: fix multiple compound literals inits in blocks (ISOC99
74   normative example - only relevant when using gotos! -> must add
75   boolean variable to tell if compound literal was already
76   initialized).
77 - add PowerPC generator and improve codegen for RISC (need
78   to suppress VT_LOCAL and use a base register instead).
79 - fix preprocessor symbol redefinition
80 - add portable byte code generator and interpreter for other
81   unsupported architectures.
82 - C++: variable declaration in for, minimal 'class' support.
83 - win32: __intxx. use resolve for bchecked malloc et al.
84   check exception code (exception filter func).
85 - handle void (__attribute__() *ptr)()
86 - VLAs are implemented in a way that is not compatible with signals:
87   http://lists.gnu.org/archive/html/tinycc-devel/2015-11/msg00018.html
89 Fixed (probably):
91 - bug with defines:
92     #define spin_lock(lock) do { } while (0)
93     #define wq_spin_lock spin_lock
94     #define TEST() wq_spin_lock(a)
95 - typedefs can be structure fields
96 - see bugfixes.diff + improvement.diff from Daniel Glockner
97 - long long constant evaluation
98 - add alloca()
99 - gcc '-E' option.
100 - #include_next support for /usr/include/limits ?
101 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
102 - win32: add __stdcall, check GetModuleHandle for dlls.
103 - macro substitution with nested definitions (ShangHongzhang)
104 - with "-run" and libtcc, a PLT is now built.
105 - '-E' option was improved
106 - packed attribute is now supported
107 - ARM and ARM64 code generators have been added.