[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Well I started the AMD64 code generator. I don't have much available yet -- > just enough for what seems to be necessary to run anything at all. > Parrot_jit_begin makes calls to MOV instructions that are implemented, and I > have a NOP implemented. Is this the bare minimum?
In jit_emit.h you need at least Parrot_jit_normal_op() to create function wrappers for non-JIIted opcodes. Parrot_jit_begin() of course and an implementation for C<end> to leave the JIT core that is clean up the stack frame, you've created in Parrot_jit_begin. For any non-trivial program you need Parrot_jit_cpcf_op and Parrot_jit_restart_op for branches including the handling of call offsets in Parrot_jit_fixup(). > I was hoping for some insights into how I can incorporate this into a > build and get the VM to recognize my code generator for trivial test > programs I want to send it. I haven't been able to test if any of > this works yet. Have a look at config/auto/jit.pl line 72. Presumed the $cpuarch eq 'x86_64' (or 'amd64') then you'd have to create that directory under 'jit' and drop your core.jit and jit_emit.h there. You can verifiy that step with: $ perl Configure.pl --verbose-step=JIT which (during make) should create src/jit_src.c from your files. > ... Can the core.jit only list the opcodes I currently > support? Yep, just put into it what's implemented. leo