(mirrored on GitHub)
cproc
is a C11 compiler using QBE as a backend. It is released
under the ISC license.
Several GNU C extensions are also implemented.
There is still much to do, but it currently implements most of the language and is capable of building software including itself, mcpp, gcc 4.7, binutils, and more.
It was inspired by several other small C compilers including 8cc, c, lacc, and scc.
The compiler itself is written in standard C11 and can be built with any conforming C11 compiler. and Rust compiler (which is cargo and rustc)
This fork of cproc work with new qbe compat implementation, which named as qberust. qberust has DAG and DSL(like LLVM's tablegen) based selection algorithm to implement retargetable instruction selection. currently, there is no target is supported. and we are planning to support few targets first in qberust.
Planned targets
- Very basic extensions with x64 archtecture
- General ARM64 architecture (without any extensions)
- General x86 archtecture (without any extensions)
- Digraph and trigraph sequences (6.4.6p3 and 5.2.1.1, will not be implemented).
- Wide string literals (#35).
- Variable-length arrays (#1).
volatile
-qualified types (#7)._Thread_local
storage-class specifier (#5).long double
type (#3).- Inline assembly (#5).
- Preprocessor (#6).
- Generation of position independent code (i.e. shared libraries, modules, PIEs).
cproc Team There is a mailing list at ~mcf/[email protected]. Feel free to use it for general discussion, questions, patches, or bug reports (if you don't have an sr.ht account).
Please report any cproc related issues to https://todo.sr.ht/~mcf/cproc.
Patches are greatly appreciated. Send them to the mailing list (preferred), or as pull-requests on the GitHub mirror.