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

Zoltan Varga vargaz at gmail.com
Wed Apr 7 06:58:31 EDT 2010


Looks ok.

        Zoltan

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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100407/b13f9496/attachment.html 


More information about the Mono-devel-list mailing list