Re: runtime variable register in dynasm?

Iain Fraser wrote:
> I wanted to see if I could have runtime variable registers in my
> dynasm. An example of what I'm trying to do is more explanatory:
> void set_reg( RegX x, int k ){
>       | mov x,k
> }

  | mov Rd(x), k

[Only works on x86, doesn't work properly on x64, not implemented
on other archs.]

That's not really the use case that DynASM was designed for.

> And then I notice most of LuaJit
> uses the functions in lj_emit_x86.h , which seems to generate
> the machine code from scratch.

LuaJIT 2.0 uses DynASM only for building the interpreter.


Other related posts: