Would my life be made fantastically simpler if I were using a different
calling convention for my callback functions on x64 running on Windows?
Yes, surely. You can still use 'normal' x86-64 CC if you don't want to
call any external functions from code being JITed. Also note a Win64
fixme in the X86CompilationCallback2 function, this can be your case. I
think the code there should be carefully inspected to be compatible with
Anyway, win64 version of compilation callback function should be added,
otherwise you'll quickly result to messed stack, invalid incoming args,
etc (this can be exactly your case now, btw).
Also, I think that you should carefully inspect, what to save there,
because you will 'mix' two CCs: JITer itself will be compiled with win64
CC and function JITed with normal x86-64 CC and they shouldn't trash the
states of each other during crossing of 'CC border'.