[Mono-list] JIT Questions

Paolo Molaro lupus@ximian.com
Mon, 16 Feb 2004 18:04:18 +0100

On 02/13/04 Ferguson, Neale wrote:
>  For the S/390 jit, I want to implement instructions like OP_LMUL & OP_LSHL
> directly rather than by emulation. The steps, I believe, include:
> 1. Define MONO_ARCH_EMULATE_LMUL for the non-s390 platforms and place it in
> the mini-xxx.h file
> 2. Surround the jit-icalls emulation routines with #ifdef
> 3. Surround the registering of the routine in mini.c with the same thing
> 4. Update inssel*. Now inssel.brg has a g_assert() for these routines, do I
> leave this and add an entry in inssel-s390.brg which will "override" it or
> what?

You can add an entry in the inssel-s390.brg file and set it's cost to "0"
so it will be used instead of the generic one in inssel.brg.
Note: those opcodes are emulated by default because the common
reg-allocation code doesn't deal with instructions with 3 input regs and
two output regs. Totte has patches to deal with that for x86, I think.
But I'd suggest to leave that optimization until after the jit is fully


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better