Hi Tobias,

2010/8/16 Tobias Käs <tobias.k...@gmx.de>:
> Torello Querci <tquerci <at> gmail.com> writes:
>>
>> [...]
>>
>> +            if ((maxStackSize | 0xffff) != 0)
>> +                maxStackSize = (maxStackSize | 0xffff)+0xffff;
>>
>> [...]
>>
>> +            if ((maxStackSize | 0xffff) != 0)
>> +                maxStackSize = (maxStackSize | 0xffff)+0xffff;
>>
>> [...]
>>
>
> This doesn't look right to me, (maxStackSize | 0xffff) is always nonzero and
> thus the branch will always be taken. From the bug entry it looks like it is
> supposed to round up to a multiple of 64K but that's not what the code is 
> doing.
>
> Probably should be something like this: (not tested!)
>
>  if ((maxStackSize & 0xffff) != 0)
>    maxStackSize = (maxStackSize & ~0xffff) + 0x10000;
>
> or rounding up without branch:
>
>  maxStackSize = ((maxStackSize + 0xffff) / 0x10000) * 0x10000;
>

You are right.
I prefer the first solution because is more clean.

> Just my 2c
> Regards
> Tobias Käs
>

Best Regards, Torello
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to