qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4 00/44] Add LoongArch LSX instructions
@ 2023-04-25  7:02 Song Gao
  2023-04-25  7:02 ` [RFC PATCH v4 01/44] target/loongarch: Add LSX data type VReg Song Gao
                   ` (44 more replies)
  0 siblings, 45 replies; 56+ messages in thread
From: Song Gao @ 2023-04-25  7:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, gaosong

Hi,

This series adds LoongArch LSX instructions, Since the LoongArch
Vol2 is not open, So we use 'RFC' title.

I'm not sure when the manual will be open.
After these patches are reviewed, how about merging them?

About test:
V2 we use RISU test the LoongArch LSX instructions.

QEMU:
    https://github.com/loongson/qemu/tree/tcg-old-abi-support-lsx
RISU:
    https://github.com/loongson/risu/tree/loongarch-suport-lsx

Build test:
make docker-test-build@fedora-i386-cross

The following patches need to be reviewed:
  0001-target-loongarch-Add-LSX-data-type-VReg.patch
  0014-target-loongarch-Implement-vmul-vmuh-vmulw-ev-od.patch
  0030-target-loongarch-Implement-vpcnt.patch
  0034-target-loongarch-Implement-LSX-fpu-fcvt-instructions.patch
  0037-target-loongarch-Implement-vbitsel-vset.patch
  0041-target-loongarch-Implement-vld-vst.patch

V4:
  - R-b and rebase;
  - Migrate the upper half lsx regs;
  - Remove tcg_gen_mulus2_*;
  - Vsetallnez use !do_match2;
  - Use tcg_gen_concat_i64_i128/tcg_gen_extr_i128_i64 to replace 
    TCGV128_LOW(val)/TCGV128_High(val);

V3:
  - R-b;
  - Add unsigned data type in vreg;
  - Add ctx->vl;
  - Use tcg_constant_vec_matching instead of dupi;
  - Use __typeof(Vd->E(0)) instead of the output type;
  - Tcg integer expansion;
  - Use tcg_gen_qemu_ld/st_i128 to implement vld/vst;
  - Fix some typos;
  - Optimize code based on Richard's comments.

V2:
  - Use gvec;
  - Fix instructions bugs;
  - Add set_fpr()/get_fpr() replace to cpu_fpr.


Song Gao (44):
  target/loongarch: Add LSX data type VReg
  target/loongarch: meson.build support build LSX
  target/loongarch: Add CHECK_SXE maccro for check LSX enable
  target/loongarch: Implement vadd/vsub
  target/loongarch: Implement vaddi/vsubi
  target/loongarch: Implement vneg
  target/loongarch: Implement vsadd/vssub
  target/loongarch: Implement vhaddw/vhsubw
  target/loongarch: Implement vaddw/vsubw
  target/loongarch: Implement vavg/vavgr
  target/loongarch: Implement vabsd
  target/loongarch: Implement vadda
  target/loongarch: Implement vmax/vmin
  target/loongarch: Implement vmul/vmuh/vmulw{ev/od}
  target/loongarch: Implement vmadd/vmsub/vmaddw{ev/od}
  target/loongarch: Implement vdiv/vmod
  target/loongarch: Implement vsat
  target/loongarch: Implement vexth
  target/loongarch: Implement vsigncov
  target/loongarch: Implement vmskltz/vmskgez/vmsknz
  target/loongarch: Implement LSX logic instructions
  target/loongarch: Implement vsll vsrl vsra vrotr
  target/loongarch: Implement vsllwil vextl
  target/loongarch: Implement vsrlr vsrar
  target/loongarch: Implement vsrln vsran
  target/loongarch: Implement vsrlrn vsrarn
  target/loongarch: Implement vssrln vssran
  target/loongarch: Implement vssrlrn vssrarn
  target/loongarch: Implement vclo vclz
  target/loongarch: Implement vpcnt
  target/loongarch: Implement vbitclr vbitset vbitrev
  target/loongarch: Implement vfrstp
  target/loongarch: Implement LSX fpu arith instructions
  target/loongarch: Implement LSX fpu fcvt instructions
  target/loongarch: Implement vseq vsle vslt
  target/loongarch: Implement vfcmp
  target/loongarch: Implement vbitsel vset
  target/loongarch: Implement vinsgr2vr vpickve2gr vreplgr2vr
  target/loongarch: Implement vreplve vpack vpick
  target/loongarch: Implement vilvl vilvh vextrins vshuf
  target/loongarch: Implement vld vst
  target/loongarch: Implement vldi
  target/loongarch: Use {set/get}_gpr replace to cpu_fpr
  target/loongarch: CPUCFG support LSX

 linux-user/loongarch64/signal.c               |    4 +-
 target/loongarch/cpu.c                        |    5 +-
 target/loongarch/cpu.h                        |   27 +-
 target/loongarch/disas.c                      |  911 ++++
 target/loongarch/fpu_helper.c                 |    2 +-
 target/loongarch/gdbstub.c                    |    4 +-
 target/loongarch/helper.h                     |  566 +++
 .../loongarch/insn_trans/trans_farith.c.inc   |   72 +-
 target/loongarch/insn_trans/trans_fcmp.c.inc  |   12 +-
 .../loongarch/insn_trans/trans_fmemory.c.inc  |   37 +-
 target/loongarch/insn_trans/trans_fmov.c.inc  |   31 +-
 target/loongarch/insn_trans/trans_lsx.c.inc   | 4400 +++++++++++++++++
 target/loongarch/insns.decode                 |  811 +++
 target/loongarch/internals.h                  |   23 +
 target/loongarch/lsx_helper.c                 | 3004 +++++++++++
 target/loongarch/machine.c                    |   79 +-
 target/loongarch/meson.build                  |    1 +
 target/loongarch/translate.c                  |   55 +-
 target/loongarch/translate.h                  |    1 +
 19 files changed, 9988 insertions(+), 57 deletions(-)
 create mode 100644 target/loongarch/insn_trans/trans_lsx.c.inc
 create mode 100644 target/loongarch/lsx_helper.c

-- 
2.31.1



^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2023-05-04 11:34 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25  7:02 [RFC PATCH v4 00/44] Add LoongArch LSX instructions Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 01/44] target/loongarch: Add LSX data type VReg Song Gao
2023-05-01 18:33   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 02/44] target/loongarch: meson.build support build LSX Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 03/44] target/loongarch: Add CHECK_SXE maccro for check LSX enable Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 04/44] target/loongarch: Implement vadd/vsub Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 05/44] target/loongarch: Implement vaddi/vsubi Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 06/44] target/loongarch: Implement vneg Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 07/44] target/loongarch: Implement vsadd/vssub Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 08/44] target/loongarch: Implement vhaddw/vhsubw Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 09/44] target/loongarch: Implement vaddw/vsubw Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 10/44] target/loongarch: Implement vavg/vavgr Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 11/44] target/loongarch: Implement vabsd Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 12/44] target/loongarch: Implement vadda Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 13/44] target/loongarch: Implement vmax/vmin Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 14/44] target/loongarch: Implement vmul/vmuh/vmulw{ev/od} Song Gao
2023-05-01 18:34   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 15/44] target/loongarch: Implement vmadd/vmsub/vmaddw{ev/od} Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 16/44] target/loongarch: Implement vdiv/vmod Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 17/44] target/loongarch: Implement vsat Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 18/44] target/loongarch: Implement vexth Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 19/44] target/loongarch: Implement vsigncov Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 20/44] target/loongarch: Implement vmskltz/vmskgez/vmsknz Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 21/44] target/loongarch: Implement LSX logic instructions Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 22/44] target/loongarch: Implement vsll vsrl vsra vrotr Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 23/44] target/loongarch: Implement vsllwil vextl Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 24/44] target/loongarch: Implement vsrlr vsrar Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 25/44] target/loongarch: Implement vsrln vsran Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 26/44] target/loongarch: Implement vsrlrn vsrarn Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 27/44] target/loongarch: Implement vssrln vssran Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 28/44] target/loongarch: Implement vssrlrn vssrarn Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 29/44] target/loongarch: Implement vclo vclz Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 30/44] target/loongarch: Implement vpcnt Song Gao
2023-05-01 18:35   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 31/44] target/loongarch: Implement vbitclr vbitset vbitrev Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 32/44] target/loongarch: Implement vfrstp Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 33/44] target/loongarch: Implement LSX fpu arith instructions Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 34/44] target/loongarch: Implement LSX fpu fcvt instructions Song Gao
2023-05-01 18:38   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 35/44] target/loongarch: Implement vseq vsle vslt Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 36/44] target/loongarch: Implement vfcmp Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 37/44] target/loongarch: Implement vbitsel vset Song Gao
2023-05-01 18:39   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 38/44] target/loongarch: Implement vinsgr2vr vpickve2gr vreplgr2vr Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 39/44] target/loongarch: Implement vreplve vpack vpick Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 40/44] target/loongarch: Implement vilvl vilvh vextrins vshuf Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 41/44] target/loongarch: Implement vld vst Song Gao
2023-05-01 18:41   ` Richard Henderson
2023-04-25  7:02 ` [RFC PATCH v4 42/44] target/loongarch: Implement vldi Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 43/44] target/loongarch: Use {set/get}_gpr replace to cpu_fpr Song Gao
2023-04-25  7:02 ` [RFC PATCH v4 44/44] target/loongarch: CPUCFG support LSX Song Gao
2023-05-01 18:43 ` [RFC PATCH v4 00/44] Add LoongArch LSX instructions Richard Henderson
2023-05-04  1:26   ` Song Gao
2023-05-04  8:25     ` Richard Henderson
2023-05-04  9:41       ` Richard Henderson
2023-05-04 11:33         ` Song Gao

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).