Where can I find a simple and easy to read x86 backend?

124 Views Asked by At

Currently I'm working in a simple code generator to output an assembly-like language.

Background:

I've already working part of a register allocator but now I need to deal with instructions like mul/div which has fixed registers as input: eax/ebx which I don't know how to deal with it, so I'm looking for see how other implemenations does it. I've tried tcc. While the code is very small I find a bit hard to understand.

NOTE: I'm targeting C/C++ because it's the languages I'm more familiar with, but implementation in any language is very welcome.

0

There are 0 best solutions below