qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Song Gao <gaosong@loongson.cn>, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 16/46] target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od}
Date: Fri, 7 Jul 2023 12:07:07 +0100	[thread overview]
Message-ID: <c2d56703-3559-90eb-419c-49ae3cc065be@linaro.org> (raw)
In-Reply-To: <20230630075904.45940-17-gaosong@loongson.cn>

On 6/30/23 08:58, Song Gao wrote:
> +#define XVMADD_Q(NAME, FN, idx1, idx2)                    \
> +static bool trans_## NAME(DisasContext *ctx, arg_vvv * a) \
> +{                                                         \
> +    TCGv_i64 rh, rl, arg1, arg2, th, tl;                  \
> +    int i;                                                \
> +                                                          \
> +    CHECK_VEC;                                            \
> +                                                          \
> +    rh = tcg_temp_new_i64();                              \
> +    rl = tcg_temp_new_i64();                              \
> +    arg1 = tcg_temp_new_i64();                            \
> +    arg2 = tcg_temp_new_i64();                            \
> +    th = tcg_temp_new_i64();                              \
> +    tl = tcg_temp_new_i64();                              \
> +                                                          \
> +    for (i = 0; i < 2; i++) {                             \
> +        get_vreg64(arg1, a->vj, idx1 + i * 2);            \
> +        get_vreg64(arg2, a->vk, idx2 + i * 2);            \
> +        get_vreg64(rh, a->vd, 1 + i * 2);                 \
> +        get_vreg64(rl, a->vd, 0 + i * 2);                 \
> +                                                          \
> +        tcg_gen_## FN ##_i64(tl, th, arg1, arg2);         \
> +        tcg_gen_add2_i64(rl, rh, rl, rh, tl, th);         \
> +                                                          \
> +        set_vreg64(rh, a->vd, 1 + i * 2);                 \
> +        set_vreg64(rl, a->vd, 0 + i * 2);                 \
> +    }                                                     \
> +                                                          \
> +    return true;                                          \
> +}

It's easier to debug if you make this a function, into which you pass parameters, like 
tcg_gen_muls2_i64.

> +    len = (simd_oprsz(v) ==  16) ? LSX_LEN : LASX_LEN;      \
> +    for (i = 0; i < len / BIT; i++) {                       \

More of this.


r~


  reply	other threads:[~2023-07-07 11:07 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  7:58 [PATCH v2 00/46] Add LoongArch LASX instructions Song Gao
2023-06-30  7:58 ` [PATCH v2 01/46] target/loongarch: Add LASX data support Song Gao
2023-07-02  5:51   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 02/46] target/loongarch: meson.build support build LASX Song Gao
2023-07-02  5:55   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 03/46] target/loongarch: Add CHECK_ASXE maccro for check LASX enable Song Gao
2023-06-30  7:58 ` [PATCH v2 04/46] target/loongarch: Implement xvadd/xvsub Song Gao
2023-07-02  5:55   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 05/46] target/loongarch: Implement xvreplgr2vr Song Gao
2023-07-02  5:56   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 06/46] target/loongarch: Implement xvaddi/xvsubi Song Gao
2023-07-02  5:59   ` Richard Henderson
2023-07-03 11:43     ` Song Gao
2023-06-30  7:58 ` [PATCH v2 07/46] target/loongarch: Implement xvneg Song Gao
2023-07-02  6:00   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 08/46] target/loongarch: Implement xvsadd/xvssub Song Gao
2023-07-02  6:01   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 09/46] target/loongarch: Implement xvhaddw/xvhsubw Song Gao
2023-07-02  6:11   ` Richard Henderson
2023-07-03 11:43     ` Song Gao
2023-06-30  7:58 ` [PATCH v2 10/46] target/loongarch: Implement xvaddw/xvsubw Song Gao
2023-07-06  8:17   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 11/46] target/loongarch: Implement xavg/xvagr Song Gao
2023-07-06  8:18   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 12/46] target/loongarch: Implement xvabsd Song Gao
2023-07-06  8:18   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 13/46] target/loongarch: Implement xvadda Song Gao
2023-07-06  8:18   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 14/46] target/loongarch: Implement xvmax/xvmin Song Gao
2023-07-06  8:19   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 15/46] target/loongarch: Implement xvmul/xvmuh/xvmulw{ev/od} Song Gao
2023-06-30  7:58 ` [PATCH v2 16/46] target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od} Song Gao
2023-07-07 11:07   ` Richard Henderson [this message]
2023-06-30  7:58 ` [PATCH v2 17/46] target/loongarch; Implement xvdiv/xvmod Song Gao
2023-07-07 11:07   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 18/46] target/loongarch: Implement xvsat Song Gao
2023-07-07 11:10   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 19/46] target/loongarch: Implement xvexth Song Gao
2023-07-07 21:05   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 20/46] target/loongarch: Implement vext2xv Song Gao
2023-07-07 21:19   ` Richard Henderson
2023-07-08  7:24     ` Song Gao
2023-06-30  7:58 ` [PATCH v2 21/46] target/loongarch: Implement xvsigncov Song Gao
2023-07-08  6:58   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 22/46] target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz Song Gao
2023-07-08  7:00   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 23/46] target/loognarch: Implement xvldi Song Gao
2023-07-08  7:02   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 24/46] target/loongarch: Implement LASX logic instructions Song Gao
2023-07-08  7:05   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 25/46] target/loongarch: Implement xvsll xvsrl xvsra xvrotr Song Gao
2023-07-08  7:05   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 26/46] target/loongarch: Implement xvsllwil xvextl Song Gao
2023-07-08  7:10   ` Richard Henderson
2023-06-30  7:58 ` [PATCH v2 27/46] target/loongarch: Implement xvsrlr xvsrar Song Gao
2023-06-30  7:58 ` [PATCH v2 28/46] target/loongarch: Implement xvsrln xvsran Song Gao
2023-06-30  7:58 ` [PATCH v2 29/46] target/loongarch: Implement xvsrlrn xvsrarn Song Gao
2023-06-30  7:58 ` [PATCH v2 30/46] target/loongarch: Implement xvssrln xvssran Song Gao
2023-06-30  7:58 ` [PATCH v2 31/46] target/loongarch: Implement xvssrlrn xvssrarn Song Gao
2023-06-30  7:58 ` [PATCH v2 32/46] target/loongarch: Implement xvclo xvclz Song Gao
2023-06-30  7:58 ` [PATCH v2 33/46] target/loongarch: Implement xvpcnt Song Gao
2023-06-30  7:58 ` [PATCH v2 34/46] target/loongarch: Implement xvbitclr xvbitset xvbitrev Song Gao
2023-06-30  7:58 ` [PATCH v2 35/46] target/loongarch: Implement xvfrstp Song Gao
2023-06-30  7:58 ` [PATCH v2 36/46] target/loongarch: Implement LASX fpu arith instructions Song Gao
2023-06-30  7:58 ` [PATCH v2 37/46] target/loongarch: Implement LASX fpu fcvt instructions Song Gao
2023-06-30  7:58 ` [PATCH v2 38/46] target/loongarch: Implement xvseq xvsle xvslt Song Gao
2023-06-30  7:58 ` [PATCH v2 39/46] target/loongarch: Implement xvfcmp Song Gao
2023-06-30  7:58 ` [PATCH v2 40/46] target/loongarch: Implement xvbitsel xvset Song Gao
2023-06-30  7:58 ` [PATCH v2 41/46] target/loongarch: Implement xvinsgr2vr xvpickve2gr Song Gao
2023-06-30  7:59 ` [PATCH v2 42/46] target/loongarch: Implement xvreplve xvinsve0 xvpickve xvb{sll/srl}v Song Gao
2023-06-30  7:59 ` [PATCH v2 43/46] target/loongarch: Implement xvpack xvpick xvilv{l/h} Song Gao
2023-06-30  7:59 ` [PATCH v2 44/46] target/loongarch: Implement xvshuf xvperm{i} xvshuf4i xvextrins Song Gao
2023-06-30  7:59 ` [PATCH v2 45/46] target/loongarch: Implement xvld xvst Song Gao
2023-06-30  7:59 ` [PATCH v2 46/46] target/loongarch: CPUCFG support LASX 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=c2d56703-3559-90eb-419c-49ae3cc065be@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=gaosong@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    /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).