Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 917 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 917 Bytes

xcc

C/C++ CI

xcc is an attempt to write a basic C compiler, based on Rui Ueyama's awesome 8cc.

Supports x86_64 Linux only, you can use WSL to run on windows platform.

Source contains a lot of comments, to make it is easy to understand what's going on.

Build

Simply run make to build.

make

To run tests:

make test

Testing as of now is a simple bash script, to add more tests, edit test.sh.

Current Progress:

  • Converts C-like code to Assembly.
  • Supports basic arithmetic operations (+. -, *, /)
  • Comparison operators (<, <=, >, >=, ==, , !=)
  • Supports "if-else" statements.
  • Supports "while" and "for" loops with block structure.