qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/9] tcg: Add INDEX_op_extract2_{i32,i64}


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/9] tcg: Add INDEX_op_extract2_{i32,i64}
Date: Sat, 9 Mar 2019 08:37:30 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 3/8/19 3:28 PM, Philippe Mathieu-Daudé wrote:
>> +        CASE_OP_32_64(extract2):
>> +            if (arg_is_const(op->args[1]) && arg_is_const(op->args[2])) {
>> +                TCGArg v1 = arg_info(op->args[1])->val;
>> +                TCGArg v2 = arg_info(op->args[2])->val;
>> +                tmp = (v1 >> op->args[3]) | (v2 << (64 - op->args[3]));
> Shouldn't this be:
> 
> tmp = (v1 >> op->args[3]) | (v2 << (TCG_TARGET_REG_BITS - op->args[3]));

No, but there should be different constants for the two cases.

Thanks.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]