Skip to content

JoltedJon/c_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jon's C Compiler

This is my own personal work in progress C compiler written in C++20. Currently the compiler has the capability of emitting to LLVM, output the AST, and also has an unfinished LC2K output.

The LLVM IR that is created goes through a couple basic optimizations to enable for better output.

There are many things that are not yet finished in this project, for instance structs/unions, and function pointers are not yet implemented. Arrays currently have no way to be outputted to LC2K yet. LC2K's output currently operates under the assumption of unlimited virtual registers, so register allocation needs to be finished, along with pushing Callee and Caller saved registers onto the stack.

No more work will be put onto this project unless if some interest is expressed for it to be completed.

Setup

Prerequisites

Building and Running

$ meson setup build
$ cd build
$ meson compile
$ ./jcc <C files>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages