[Mono-list] PowerPC JIT

Paolo Molaro lupus@ximian.com
Mon, 26 Aug 2002 17:27:23 +0200

On 08/26/02 Carlos Valiente wrote:
> > regset.c and linear-scan.c (and their header files) should definitely
> > not be arch-specific. If currently there's some arch-specific code in
> > them, it should be removed (maybe changing them so that arch-specific
> > code can add hooks if needed, but that's all).
> The problem with regset.[ch] is that MonoRegSet uses integer bitmasks
> for keeping track of register usage - that is, there's only room for 32
> registers. In a first stage, as I will be working only with integers,
> it's enough, but later on I think I'll need something else to keep track
> of the 32 FPRs. Let's see.

You'll have to use a different regset for FP registers: since operations
on FP and integers registers are so different anyway that makes sense.
It's not like you have 64 registers that you can use however you like as
FP or ints. You have two different sets of 32 registers: that maps
pretty well to two different MonoRegSets.

> Regarding linear-scan, it has some x86 registers hard-coded in it, and
> it uses MonoRegset - nothing too difficult to patch, certainly.

MonoRegSet is a non-issue, see above.
In mono_linear_scan() there are two hardcoded x86 registers, but it's so
easy to remove them: make it an argument to the function (as a bitmap)
and you're done. The function is called from emit-x86.c, so your
customized call will be in emit-ppc.c and it'll use whatever registers
are correct for that arch.


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