[Mono-dev] Building Mono on Linux/Alpha

Zoltan Varga vargaz at gmail.com
Wed Feb 1 05:22:10 EST 2006


                                          Hi,

  mono_arch_allocate_vars () is used to determine the location where
each variable
is stored, i.e. in a global register (OP_REGVAR), or on the stack
(OP_REGOFFSET). You can reserve a register by preventing the JIT from
allocating other stuff to it, by:
- not returning that register from mono_arch_get_int_regs ()
- not using it for local register allocation, this can be done by not
including it
  in MONO_ARCH_CALLEE_REGS.

I suggest using the x86, amd64 or ia64 backends for copying code from, since
these three backends are mostly similar, and they use some common functionality
like:
- the local register allocator in mini-codegen.c.
- the function to allocate stack slots in mono_allocate_stack_slots ()
etc.

                                                             Zoltan

On 2/1/06, Sergey Tikhonov <tsv at solvo.ru> wrote:
> Zoltan Varga wrote:
>
> >                 Hi,
> >
> > Defining MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE is the
> >preferred method.
> >
> >
> Hello,
>
> How I have something that produces some code, which of cause doesn't
> work. :) But I got an idea.
> I have some problems that someone could help me with.
> I could not understand what the "mono_arch_allocate_vars" is supposed to
> do. I copied it from another arch and
> it seems to work, but I don't understand it. At what point and for what
> reason the JIT calls it? Based on the trace
> the "mono_arch_allocate_vars" is called when JIT finds "calli" IL opcode.
> Another problem is implementing "iconst/i8const" opcode (it is a simple
> one but it would help to understand the internals).
> Alpha doesn't have instructions to load 64bits contstant to a register,
> but there are other instructions that I could use to emulate this.
> I need one temporary register, but I could not understand how to reserve
> it (at what point). Let say I don't want to add new opcode.
> The definition is "iconst" opcode in md file uses only one "dest" register.
>
> Thank you,
>
> --
> Sergey Tikhonov
> Solvo Ltd.
> tsv at solvo.ru
>
>



More information about the Mono-devel-list mailing list