qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction


From: Song Gao
Subject: Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation
Date: Wed, 4 Aug 2021 15:40:18 +0800
User-agent: Mozilla/5.0 (X11; Linux mips64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/23/2021 01:12 PM, Richard Henderson wrote:
>> +static bool trans_asrtle_d(DisasContext *ctx, arg_asrtle_d * a)
>> +{
>> +    TCGv t0, t1;
>> +
>> +    t0 = get_gpr(a->rj);
>> +    t1 = get_gpr(a->rk);
>> +
>> +    gen_helper_asrtle_d(cpu_env, t0, t1);
>> +
>> +    return true;
>> +}
>> +
>> +static bool trans_asrtgt_d(DisasContext *ctx, arg_asrtgt_d * a)
>> +{
>> +    TCGv t0, t1;
>> +
>> +    t0 = get_gpr(a->rj);
>> +    t1 = get_gpr(a->rk);
>> +
>> +    gen_helper_asrtgt_d(cpu_env, t0, t1);
>> +
>> +    return true;
>> +}
> 
> I'm not sure why both of these instructions are in the ISA, since
> 
>   ASRTLE X,Y <-> ASRTGT Y,X
> 
> but we certainly don't need two different helpers.
> Just swap the arguments for one of them.

Hi, Richard.

I find 'ASRTLE X,Y <-> ASRTGT Y,X ' is not right,
 
    ASRTLE X, Y is X <= Y, raise a exception.
    ASRTGT Y, X is X < Y, raise a exception, lose X=Y.

Thanks
Song Gao




reply via email to

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