On 14 March 2013 19:01, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Yes. RTL is essentially an assembler for an abstract machine with readable names for registers. Arguably the Cog back-end assembler is an RTL. It has abstract registers (ReceiverResultReg, ClassReg etc), and abstract operations (e.g. MoveR:R:). To do marshalling you need only define argument registers (floating-point and integer, an empty set on the x86), return registers, the stack pointer, and maybe the frame pointer, plus a basic set of data manipulation instructions. Then either define these as numeric constants so that the JIT interprets sequences of numbers, or strings, so that the JIT uses string matching (the former is of course faster and slimmer). The JIT maps these abstract instructions and register names into concrete machine code and register numbers.
[snip] yes.. this definition fits quite well with what we're working on.. thanks for pointer(s). -- Best regards, Igor Stasenko.