On 05/28/2013 12:17 AM, Claudio Fontana wrote:
>> > if (type == TCG_TYPE_I32) {
>> > value = (uint32_t)value;
>> > ext = 0;
>> > } else if (value <= 0xffffffff) {
>> > ext = 0;
>> > } else {
>> > ext = 0x80000000;
>> > }
> The check for type is probably unnecessary, since we don't gain anything (we
> still have to check something once), so I'd rather use a uint64_t parameter
> and then just check for value < 0xffffffff.
>
The check for type is necessary, because we don't guarantee that the high bits
of value are zero, sign-extended, or indeed garbage, for TYPE_I32.
r~