qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 00/44] Add LoongArch LSX instructions
@ 2023-04-20  8:06 Song Gao
  2023-04-20  8:06 ` [RFC PATCH v3 01/44] target/loongarch: Add LSX data type VReg Song Gao
                   ` (43 more replies)
  0 siblings, 44 replies; 66+ messages in thread
From: Song Gao @ 2023-04-20  8:06 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.

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

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

 include/tcg/tcg-op.h                          |    4 +
 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   | 4390 +++++++++++++++++
 target/loongarch/insns.decode                 |  811 +++
 target/loongarch/internals.h                  |   23 +
 target/loongarch/lsx_helper.c                 | 3012 +++++++++++
 target/loongarch/machine.c                    |  115 +-
 target/loongarch/meson.build                  |    1 +
 target/loongarch/translate.c                  |   55 +-
 target/loongarch/translate.h                  |    1 +
 tcg/tcg-op.c                                  |   43 +
 21 files changed, 10071 insertions(+), 55 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] 66+ messages in thread

end of thread, other threads:[~2023-04-24 16:03 UTC | newest]

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