views:

39

answers:

1

Greetings Overflowers,

I am trying to deeply understand how one can develop an x86 (ia32/ia64) backend for OO languages (staticly/dynamically tryped), mainly to be run on Windows OS.

I have a good understanding of the x86 architecture, Windows architecture and how to get a code to the tree level ready to be optimized and serialized into machine native code.

It is just that step (serialization) that I do not really grasp and I want to learn more about. For example, is there standard x86 set of serialized instructions for a loop node in the code tree ?

I am trying to read through compiler books now, but are there specific materials (books, tutorials, projects... etc) to that subject ?

How about using the C language as an intermediate language and make use of some ready-made C compilers as a backend, such as ICC for their excellent optimizations ?

Many Thanks for You All !

A: 

Yes, you can output another language such as C and then compile that to your platform's machine language. Cfront, the original C++ compiler did exactly that.

Another possibility would be to use LLVM which gives you an abstract API for generating machine language.

R Samuel Klatchko
Thanks R. Samuel.What happened next to C++, did it stay using this technique and why not if no ?
geeko
@geeko - please don't confuse a specific compiler with the entire C++ language. AFAIK, Cfront always generated C; eventually other compilers that directly generated machine code were implemented.
R Samuel Klatchko
Ouch, yes I did get confused ! Thank you R. Smauel :)
geeko