[Mono-dev] [PATCH] Fix CompareExchange inlining for I8

Kornél Pál kornelpal at gmail.com
Thu Apr 8 06:58:34 EDT 2010


Hi,

Fixed in SVN HEAD r155039 and mono-2-6 r155040.

Kornél

Miguel de Icaza wrote:
> Hello,
> 
>     Would you mind backporting this to the 2-6 branch as well?
> 
> 2010/4/7 Kornél Pál <kornelpal at gmail.com>:
>> Hi,
>>
>> Currently CompareExchange for I8 is never inlined because of a typo.
>>
>> Note that other Interlocked methods use SIZEOF_REGISTER while this use the
>> size of pointer and I don't know which one of these is the right one since
>> both registers and pointers are involved.
>>
>> Please review the patch.
>>
>> Kornél
>>
>> Index: method-to-ir.c
>> ===================================================================
>> --- method-to-ir.c      (revision 154913)
>> +++ method-to-ir.c      (working copy)
>> @@ -4252,7 +4252,7 @@
>>                                size = 4;
>>                        else if (is_ref || fsig->params [1]->type ==
>> MONO_TYPE_I)
>>                                size = sizeof (gpointer);
>> -                       else if (sizeof (gpointer) == 8 && fsig->params
>> [1]->type == MONO_TYPE_I4)
>> +                       else if (sizeof (gpointer) == 8 && fsig->params
>> [1]->type == MONO_TYPE_I8)
>>                                size = 8;
>>                        if (size == 4) {
>>                                MONO_INST_NEW (cfg, ins, OP_ATOMIC_CAS_I4);
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
> 


More information about the Mono-devel-list mailing list