dynamic asm code generation


Fri, 12 Jan 1996 23:45:08 +0000 (GMT)


> Hello list,
  Hiya Dick. Nice to meet you. Do you intend to participate actively ?

> Does anyone on the list have any experience with the dynamic generation
> of machine code? Or know of any tools which can give some element of
> portability in this area?
   Dynamic generation of machine code is neither more nor less complicated
than assembling and linking separately. Having it dynamic only requires
some modular approach to that, so the various parts do not enter in
conflict. As for portability, the only way to be fully portable is write
modular code, have some bytecode producer/interpreter, and separate
plug-in modules for architecture-specific assembly.
   I fear I am not there yet in the TUNES LLL (hope to reach that point soon),
but you could read the (free) sources for Caml Special Light
(csl-1.13 somewhere on ftp.inria.fr:/local/lang/caml-light/),
which already does all of that.


> Given a contiguous vector of elements such as ints, doubles, bits, etc.,
> I need to set out on a sensible direction such that I can execute the
> machine code generator on different architectures.
   I'm not sure what you mean...

> The extent of the generation is simply the machine code to 'access' the
> 'next' element of an array.
   If that's all you need, you could have dirty ad-hoc macros do that
instead of a full assembler. The above remarks still hold.


   Hope this helps...