On 08/04/2021 03:40 PM, Song Gao wrote:
> 
> 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.
> 

sorry, I said it wrong。

     ASRTLE X, Y is X > Y,  raise a exception.
     ASRTGT Y, X is X >= Y  raise a exception.  more X=Y.

> Thanks
> Song Gao
> 


Reply via email to