Even though the C compiler isn't anywhere near completion, it does now produce code that might be ugly but is capable of producing good enough assembly.
The goal of this all is to create a proper test suite of executable programs that can be used to check if future changes in the cpu still perform as designed.
Compiler status
The compiler now supports most control structures (for, while, if/else, break, continue, return) except switch.
It supports char and int data types including pointers and arrays but not yet structs or unions. Some work to support floats is underway (see below).
Variables can be automatic (local) or static (file scope).
Most unary and binary operators are supported including the ternary ?: operator, pointer dereferencing (*) and function calls, but not the address of operator (&).
Type checking however is weak (almost non existent to be honest 😁) and the assembly code it produces is far from optimal but it works. Storage specifiers like static and volatile are completely ignored.
Implemented functions
The implementation is done from scratch and of course targeted at just the Robin SoC, which makes life a lot easier because a full blown portable libc is humongous.
The current status (with links) is shown below; more functions will probably follow soon, especially low level functions to implement a (bare bones) soft float library.
From string.h
strlen.c
strchr.c
strreverse.c
From stdio.h
putchar.c
print.c (this one is not actually in libc, it just prints a string)
From stdlib.h
atoi.c
ftoi.c
itoa.c
itof.c
Conclusion
These functions need to be thoroughly tested before they can actually be used as a proper test suite for the hardware but I feel we have started quite well.