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.
As of right now, I still have the i386 code.jit file, and I don't know how that
works when I don't have all the requisite instructions implemented. Can the
core.jit only list the opcodes I currently support? Do I need stubs for all
the opcodes?
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