qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instr


From: Richard Henderson
Subject: Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation
Date: Wed, 17 Nov 2021 10:55:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 11/17/21 10:29 AM, gaosong wrote:
gen_rr_i ?

The code is not written completely,  like this:

gen_rr_i12:

@fmt_rr_i12               .... ...... imm:s12 rj:5 rd:5 &rr_i
slti         0000 001000 ............ ..... .....     @fmt_rr_i12
sltui        0000 001001 ............ ..... .....     @fmt_rr_i12
...

gen_rr_ui12:

@fmt_rr_ui12               .... ...... imm:12 rj:5 rd:5 &rr_i
andi         0000 001101 ............ ..... .....     @fmt_rr_ui12
ori          0000 001110 ............ ..... .....     @fmt_rr_ui12
xori         0000 001111 ............ ..... .....     @fmt_rr_ui12
...

@fmt_rr_i12 and @fmt_rr_ui12 are two 'Formats',  but they use the same 
'Argument sets'(rr_i).

What I meant is that there would be a single gen_rr_i function handing the argument set rr_i; no need for two gen_rr_i* functions.

gen_rrr_sa2p1:

@fmt_rrr_sa2p1        .... ........ ... .. rk:5 rj:5 rd:5   &fmt_rr_sa  
sa=%sa2p1
lsl_w           0000 00000000 010 .. ..... ..... .....    @fmt_rrr_sa2p1
alsl_wu          0000 00000000 011 .. ..... ..... .....   @fmt_rrr_sa2p1
alsl_d           0000 00000010 110 .. ..... ..... .....   @fmt_rrr_sa2p1
...

gen_rrr_sa2:
@fmt_rrr_sa2        .... ........ ... sa:2 rk:5 rj:5 rd:5   &fmt_rr_sa
bytepick_w       0000 00000000 100 .. ..... ..... .....   @fmt_rrr_sa3
...

gen_rrr_sa3:
@fmt_rrr_sa3         .... ........ .. sa:3 rk:5 rj:5 rd:5   &fmt_rr_sa
bytepick_d       0000 00000000 11 ... ..... ..... .....   @fmt_rrr_sa3
...

Likewise a single gen_rrr_sa function.


r~



reply via email to

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