[Mono-dev] Building Mono on Linux/Alpha

Sergey Tikhonov tsv at solvo.ru
Tue Aug 15 10:37:14 EDT 2006


Hello Zoltan,

>                                      Hi,
>
>> I have a question:
>> Alpha arch doesn't have unassigned compare for floats, but IR seems to
>> require it. What would be the best place to
>> implement taking abs values for arguments to compare and do comparition?
>> I was thinking of using inssel-alpha.brg file to add instruction like
>> "stmt: OP_COND_BRANCH (OP_COMPARE(freg, freg)) { ... }"
>> (I found usage like this in inssel-arm.brg) to implement abs of fregs
>> and do compare, but I read documentation that this would limit
>> optimization and register allocation logic.
>
>
> I don't know how that would limit optimization, so I think it is fine 
> for now.
>
>> Another thing - Alpha doesn't have special flag register to hold
>> comparition result and uses some of common registers. Right now I am 
>> using
>> one predefined register, but this limit its usage for other ops. I would
>> like to use local register allocation to allocate register to hold
>> compare results and use it in conditional branch instruction.
>>
>
> This is not currently possible, ia64 has the same problem and uses a 
> dedicated
> predicate register.

Ok, I was able to implement float compare (including unordered compare) 
in brg file. It really simplified things.
Almost all basic-float tests passed.

I have a problem with handling of exceptions (divide by zero exception 
to be exact).
In my current implementation the CEE_DIV opcode uses mono_idiv function 
which does actual division.
This method is called without wrapper function (I guess this is because 
it is registered as opcode_emulation) and
it doesn't have flag "save_lmf" set. So I don't save LMF for it and 
couldn't find exception handler. :(
Do I understand the current logic with unmanaged opcode emulation 
functions correctly?
Do I need to implement div opcode? (yes I guess I need, but I was 
thinking to do it later)

Thank you,

-- 
Sergey Tikhonov

Solvo Ltd.
Saint-Petersburg, Russia
tsv at solvo.ru




More information about the Mono-devel-list mailing list