Skip to main content

EDDIC 0.9.1 - Enhanced floating point support

I just released the version 0.9.1 of the EDDI Compiler (eddic).

This release is a minor one, there are no huge changes to the language nor in the compiler itself. But that version was necessary before the 1.0 version.

The floating point support of the language have been enhanced with casts. You can now cast float values to int and vice-versa. The syntax is the same as in C:

void main(){
   float a = 1.5;
   float b = a + (float) 100;

Another improvement is the support for integer suffixes for float:

void main(){
   float a = 100f;

Finally, the optimizer has been adapted to support float as well. The optimization techniques are the same as the one for integers.

Last but not least, the compiler can now pass some parameters in registers. In 32 bits platform, the first integer parameter is passed in a register and on 64 bits platform, the first two parameters are passed in registers. In both architectures, the first float parameter is passed in a SSE register.

Future work

The next version will be the 1.0 version. There will be several major changes with this new version.

First, the optimization engine will be almost entirely rewritten. Global optimization will be added to the engine.

There will also be some improvements in the intermediate representation. I will probably a second level of intermediate representation: a low-level Three Address Code representation. This new intermediate representation will be generated by an IntelCompiler to handle stuff common to both 32 and 64bits code generator. This will also includes a pass for global register allocation.

As these changes will not be simple to implement, this version can takes some time before being released.


You can find the compiler sources on the Github repository:

The exact version I refer to is the v0.9.1 available in the GitHub tags or directly as the release branch.


Comments powered by Disqus