I now have an x86 simulator integrated into Squeak that can execute code
form a ByteArray, Bitmap etc. So I'm now ready to write the JIT code
generator. I want a simple framework that can convert from an abstract
register-transfer-level instruction set to a concrete machine code, x86/IA32
in the first instance. I wonder what frameworks there are that I can, um,
exploit. The end result must be Smalltalk code that can generate machine
code and can be translated via Slang to C. I've already extended Slang
somewhat for the Stack VM so that simple classes can be converted to
structs. But the Slang technology I have is still a long way from
translating arbitrary Smalltalk to C, so when you think "Smalltalk
framework" think "Limited Smalltalk/C hybrid framework".
I know that Exupery has an assembler in it but it is quite high-level and
oriented to textual assembly whereas my JIT will have no assembler level in
it, just stack contents abstractions (to model receiver, arguments,
temporaries, intermediates, constants, etc), register transfer level and
concrete machine code. I know Ian has written the exact framework I need
but in C. Are there any other candidates?
Ian, how difficult would it be to translate your framework (ccg?) into
Smalltalk so that it can be translated back into C via Slang? My guess is
not too hard. Have you got a pointer to an up-to-date ccg? Also, what
other ISAs does it target?