qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: gaosong <gaosong@loongson.cn>
Cc: Xiaojuan Yang <yangxiaojuan@loongson.cn>,
	qemu-devel@nongnu.org, laurent@vivier.eu
Subject: Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation
Date: Wed, 17 Nov 2021 10:55:36 +0100	[thread overview]
Message-ID: <75e1049b-b09c-7b6d-990f-d2c341ca12c8@linaro.org> (raw)
In-Reply-To: <a46e8df8-ccb9-52d0-2e73-33a49e92bfd8@loongson.cn>

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	other threads:[~2021-11-17  9:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  6:53 [PATCH v10 00/26] Add LoongArch linux-user emulation support Song Gao
2021-11-12  6:53 ` [PATCH v10 01/26] target/loongarch: Add README Song Gao
2021-11-12  6:53 ` [PATCH v10 02/26] target/loongarch: Add core definition Song Gao
2021-11-12  6:53 ` [PATCH v10 03/26] target/loongarch: Add main translation routines Song Gao
2021-11-12  6:53 ` [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation Song Gao
2021-11-12 14:05   ` Richard Henderson
2021-11-13  3:18     ` WANG Xuerui
2021-11-15  3:59     ` gaosong
2021-11-15  8:42       ` Richard Henderson
2021-11-17  7:57         ` gaosong
2021-11-17  8:28           ` Richard Henderson
2021-11-17  9:29             ` gaosong
2021-11-17  9:55               ` Richard Henderson [this message]
2021-11-18  1:24                 ` gaosong
2021-11-12  6:53 ` [PATCH v10 05/26] target/loongarch: Add fixed point shift " Song Gao
2021-11-12  6:53 ` [PATCH v10 06/26] target/loongarch: Add fixed point bit " Song Gao
2021-11-12  6:53 ` [PATCH v10 07/26] target/loongarch: Add fixed point load/store " Song Gao
2021-11-12  6:53 ` [PATCH v10 08/26] target/loongarch: Add fixed point atomic " Song Gao
2021-11-12  6:53 ` [PATCH v10 09/26] target/loongarch: Add fixed point extra " Song Gao
2021-11-12  6:53 ` [PATCH v10 10/26] target/loongarch: Add floating point arithmetic " Song Gao
2021-11-12  6:53 ` [PATCH v10 11/26] target/loongarch: Add floating point comparison " Song Gao
2021-11-12  6:53 ` [PATCH v10 12/26] target/loongarch: Add floating point conversion " Song Gao
2021-11-12  6:53 ` [PATCH v10 13/26] target/loongarch: Add floating point move " Song Gao
2021-11-12  6:53 ` [PATCH v10 14/26] target/loongarch: Add floating point load/store " Song Gao
2021-11-12  6:53 ` [PATCH v10 15/26] target/loongarch: Add branch " Song Gao
2021-11-12  6:53 ` [PATCH v10 16/26] target/loongarch: Add disassembler Song Gao
2021-11-12  7:39   ` Richard Henderson
2021-11-12  9:59     ` gaosong
2021-11-12  6:54 ` [PATCH v10 17/26] linux-user: Add LoongArch generic header files Song Gao
2021-11-16  8:33   ` Philippe Mathieu-Daudé
2021-11-16 11:50     ` gaosong
2021-11-12  6:54 ` [PATCH v10 18/26] linux-user: Add LoongArch specific structures Song Gao
2021-11-12  6:54 ` [PATCH v10 19/26] linux-user: Add LoongArch signal support Song Gao
2021-11-12  6:54 ` [PATCH v10 20/26] linux-user: Add LoongArch elf support Song Gao
2021-11-12  6:54 ` [PATCH v10 21/26] linux-user: Add LoongArch syscall support Song Gao
2021-11-12  6:54 ` [PATCH v10 22/26] linux-user: Add LoongArch cpu_loop support Song Gao
2021-11-12  6:54 ` [PATCH v10 23/26] default-configs: Add loongarch linux-user support Song Gao
2021-11-12  6:54 ` [PATCH v10 24/26] target/loongarch: Add target build suport Song Gao
2021-11-12  6:54 ` [PATCH v10 25/26] target/loongarch: 'make check-tcg' support Song Gao
2021-11-12  6:54 ` [PATCH v10 26/26] scripts: add loongarch64 binfmt config Song Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75e1049b-b09c-7b6d-990f-d2c341ca12c8@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=gaosong@loongson.cn \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=yangxiaojuan@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).