diff options
Diffstat (limited to 'docs/CHIBICC_MODS.txt')
-rw-r--r-- | docs/CHIBICC_MODS.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/CHIBICC_MODS.txt b/docs/CHIBICC_MODS.txt new file mode 100644 index 0000000..ab733ba --- /dev/null +++ b/docs/CHIBICC_MODS.txt @@ -0,0 +1,14 @@ +we're attempting to stay as close to mainline chibicc as possible + +at a high level, the major changes made are: +- strip out most of proprocess.c, as we're OK with using GCC's preprocessor + (still need preprocess.c, as it handles parsing of literals) +- add a typegen.c, which runs before codegen & outputs the typedefs +- replace codegen.c to output C instead of assembly + +to support these, ended up making some changes to the rest of the files. these +include: + - in type.c:usual_arith_conv, + - don't cast if they're already the right type + - for pointer arithmetic, leave it as pointer + long + - in parse.c:is_const_expr, also allow modulos to be const |