The vmwcc c-subset Compiler
News
- Version 0.1.7 released 17 July 2004.
Character array support. Traditional
"Hello World" will compile, if you
create a protoype for printf and link against libc.
- Version 0.1.6 released 18 June 2004.
More updates, including for loop support
and preliminary libc linkage.
- Version 0.1.3 released 15 June 2004.
Many improvements, including non-void function support.
- Version 0.1.1 released 14 June 2004.
Initial public release.
Download
Background
This compiler started out as my optimizing compilers project for ECE495
at Cornell. I eventually got it working up to spec (although much too late
to be counted toward my grade) and I've continued working on it since then.
Features
- Uses SSA (Static Single Assignment) as an intermediate representation.
- Parser/Scanner crated from EBNF.
- Multi-architecture (eventually. Right now is PowerPC-linux only)
- Designed to optimize for size rather than performance.
- Multiple optimizing passes (disabled for now until debugged).
- Command-line arguments compatible with gcc.
The C-Subset Supported
| feature | working | will it ever |
| if/else | yes | |
| while | yes | |
| structs | yes | |
| arrays | yes | |
| integer math | yes | |
| long type | yes | |
| int type | yes | |
| non-void funcs | yes | |
| for loops | yes | |
| chars | yes | |
| link to libc | partial | |
| pre/post inc/dec | partial | |
| | |
| floating-point | no | unlikely |
| ternary (?) | no | unlikely |
| bitwise ops | no | maybe |
| pointers | no | maybe |
| +=,-=,*=,etc | no | maybe |
| c pre-processor | no | hopefully a subset |
| goto | no | unlikely |
| switch()/case | no | unlikely |
| in-line assembly | no | unlikely |
| self-hosting | no | when pigs fly |
Benchmarks
Later
Vince Weaver <vince at deater . net>
Back to the vmw Software Productions Page