-
Notifications
You must be signed in to change notification settings - Fork 2
/
TODO
84 lines (62 loc) · 1.82 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Major things
- floating-point support
- multi-word integer arithmetic (eg. uint64_t on 32bit arch)
- passing & returning structs in function calls
# Linking support
- support for building shared libraries
# libbcc
- crtbegin.o, crtend.o
- libbcc.a
- riscv32: software multiply seems broken
# Language
- proper switch/case
- allow support for old C-style (function) pointers
- add configure option to disable extensions
- add support for strings containing '\0' values
- implement constant propagation
- <stdarg.h> header
- long long & long double
- <stdint.h>: UINTN_C()
# IR-generation
- more advanced optimization techniques
- fix remove_unreferenced() for function call arguments
# Architecture-specific related
General:
- replace `builtin functions` with `inlinable intrinsics`
x86:
- optimize function calls
- add VLAs back
riscv:
- more simple optimizations
- add VLAs
- check detect_sys.sh on real hardware
arm:
- Support for big-endian
- Add support for aarch64/armv8+
- Add VLAs
# Pre-processor
- create a test-suite
- more test cases for macro expansion
- support for variadic macros
- #pragma
# Test suite
# Known bugs
- not working test cases:
- 'arraylen(VLA)'
- 'sizeof(VLA)'
- 'return struct'
- 'pass struct'
- multi-core `make` may be broken
# Documentation
- update and finish the manual
- add comments describing the code
- add a guide on how to port this project to a new arch
# Other
- options: -g, --sysroot=
- add zsh-completions
- retire the preliminary bcl wrapper
# Helpful Resources/Websites
- POSIX C99 compiler - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
- C reference - https://en.cppreference.com/w/c
- System V ABI - https://wiki.osdev.org/System_V_ABI
- Stuff for crtX.o - https://wiki.osdev.org/Creating_a_C_Library#Program_Initialization