qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v5 00/57] Add LoongArch LASX instructions
@ 2023-09-07  8:31 Song Gao
  2023-09-07  8:31 ` [PATCH RESEND v5 01/57] target/loongarch: Renamed lsx*.c to vec* .c Song Gao
                   ` (56 more replies)
  0 siblings, 57 replies; 87+ messages in thread
From: Song Gao @ 2023-09-07  8:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, maobibo

Hi,

This series adds LoongArch LASX instructions.

About test:
We use RISU test the LoongArch LASX instructions.

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

Please review, Thanks.

Changes for v5:
- Rebase;
- Split V4'patch 10 to 7 patches(patch3-9);
- LSX use gen/gvec_vv..
- LASX use gen/gvec_xx...
- Don't use an array of shift_res. (patch40,41);
- Move simply DO_XX marcos together. (patch56);
- Renamed lsx*.c to vec*.c. (patch 1);
- Change marcos CHECK_VEC to check_vec(ctx, oprsz);
- R-b.

Changes for v4:
- Rebase;
- Add avail_LASX to check.

Changes for v3:
- Add a new patch 9, rename lsx_helper.c to vec_helper.c,
  and use gen_helper_gvec_* series functions;
- Use i < oprsz / (BIT / 8) in loop;
- Some helper functions use loop;
- patch 46: use tcg_gen_qemu_ld/st_i64 for xvld/xvst{x};
- R-b.

Changes for v2:
- Expand the definition of VReg to be 256 bits.
- Use more LSX functions.
- R-b.

Song Gao (57):
  target/loongarch: Renamed lsx*.c to vec* .c
  target/loongarch: Implement gvec_*_vl functions
  target/loongarch: Use gen_helper_gvec_4_ptr for 4OP + env vector
    instructions
  target/loongarch: Use gen_helper_gvec_4 for 4OP vector instructions
  target/loongarch: Use gen_helper_gvec_3_ptr for 3OP + env vector
    instructions
  target/loongarch: Use gen_helper_gvec_3 for 3OP vector instructions
  target/loongarch: Use gen_helper_gvec_2_ptr for 2OP + env vector
    instructions
  target/loongarch: Use gen_helper_gvec_2 for 2OP vector instructions
  target/loongarch: Use gen_helper_gvec_2i for 2OP + imm vector
    instructions
  target/loongarch: Replace CHECK_SXE to check_vec(ctx, 16)
  target/loongarch: Add LASX data support
  target/loongarch: check_vec support check LASX instructions
  target/loongarch: Add avail_LASX to check LASX instructions
  target/loongarch: Implement xvadd/xvsub
  target/loongarch: Implement xvreplgr2vr
  target/loongarch: Implement xvaddi/xvsubi
  target/loongarch: Implement xvneg
  target/loongarch: Implement xvsadd/xvssub
  target/loongarch: Implement xvhaddw/xvhsubw
  target/loongarch: Implement xvaddw/xvsubw
  target/loongarch: Implement xavg/xvagr
  target/loongarch: Implement xvabsd
  target/loongarch: Implement xvadda
  target/loongarch: Implement xvmax/xvmin
  target/loongarch: Implement xvmul/xvmuh/xvmulw{ev/od}
  target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od}
  target/loongarch; Implement xvdiv/xvmod
  target/loongarch: Implement xvsat
  target/loongarch: Implement xvexth
  target/loongarch: Implement vext2xv
  target/loongarch: Implement xvsigncov
  target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz
  target/loognarch: Implement xvldi
  target/loongarch: Implement LASX logic instructions
  target/loongarch: Implement xvsll xvsrl xvsra xvrotr
  target/loongarch: Implement xvsllwil xvextl
  target/loongarch: Implement xvsrlr xvsrar
  target/loongarch: Implement xvsrln xvsran
  target/loongarch: Implement xvsrlrn xvsrarn
  target/loongarch: Implement xvssrln xvssran
  target/loongarch: Implement xvssrlrn xvssrarn
  target/loongarch: Implement xvclo xvclz
  target/loongarch: Implement xvpcnt
  target/loongarch: Implement xvbitclr xvbitset xvbitrev
  target/loongarch: Implement xvfrstp
  target/loongarch: Implement LASX fpu arith instructions
  target/loongarch: Implement LASX fpu fcvt instructions
  target/loongarch: Implement xvseq xvsle xvslt
  target/loongarch: Implement xvfcmp
  target/loongarch: Implement xvbitsel xvset
  target/loongarch: Implement xvinsgr2vr xvpickve2gr
  target/loongarch: Implement xvreplve xvinsve0 xvpickve
  target/loongarch: Implement xvpack xvpick xvilv{l/h}
  target/loongarch: Implement xvshuf xvperm{i} xvshuf4i
  target/loongarch: Implement xvld xvst
  target/loongarch: Move simply DO_XX marcos togther
  target/loongarch: CPUCFG support LASX

 target/loongarch/cpu.h                        |   26 +-
 target/loongarch/helper.h                     |  689 ++--
 target/loongarch/internals.h                  |   22 -
 target/loongarch/translate.h                  |    1 +
 target/loongarch/vec.h                        |   75 +
 target/loongarch/insns.decode                 |  782 ++++
 linux-user/loongarch64/signal.c               |    1 +
 target/loongarch/cpu.c                        |    4 +
 target/loongarch/disas.c                      |  924 +++++
 target/loongarch/gdbstub.c                    |    1 +
 target/loongarch/lsx_helper.c                 | 3004 --------------
 target/loongarch/machine.c                    |   36 +-
 target/loongarch/translate.c                  |    7 +-
 target/loongarch/vec_helper.c                 | 3508 +++++++++++++++++
 .../{trans_lsx.c.inc => trans_vec.c.inc}      | 2413 +++++++++---
 target/loongarch/meson.build                  |    2 +-
 16 files changed, 7669 insertions(+), 3826 deletions(-)
 create mode 100644 target/loongarch/vec.h
 delete mode 100644 target/loongarch/lsx_helper.c
 create mode 100644 target/loongarch/vec_helper.c
 rename target/loongarch/insn_trans/{trans_lsx.c.inc => trans_vec.c.inc} (62%)

-- 
2.39.1



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

end of thread, other threads:[~2023-09-12 16:21 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07  8:31 [PATCH RESEND v5 00/57] Add LoongArch LASX instructions Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 01/57] target/loongarch: Renamed lsx*.c to vec* .c Song Gao
2023-09-07 16:37   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 02/57] target/loongarch: Implement gvec_*_vl functions Song Gao
2023-09-07 17:19   ` Richard Henderson
2023-09-08  3:21     ` gaosong
2023-09-07  8:31 ` [PATCH RESEND v5 03/57] target/loongarch: Use gen_helper_gvec_4_ptr for 4OP + env vector instructions Song Gao
2023-09-07 17:34   ` Richard Henderson
2023-09-08  3:22     ` gaosong
2023-09-07  8:31 ` [PATCH RESEND v5 04/57] target/loongarch: Use gen_helper_gvec_4 for 4OP " Song Gao
2023-09-10  0:47   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 05/57] target/loongarch: Use gen_helper_gvec_3_ptr for 3OP + env " Song Gao
2023-09-10  0:51   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 06/57] target/loongarch: Use gen_helper_gvec_3 for 3OP " Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 07/57] target/loongarch: Use gen_helper_gvec_2_ptr for 2OP + env " Song Gao
2023-09-10  0:59   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 08/57] target/loongarch: Use gen_helper_gvec_2 for 2OP " Song Gao
2023-09-10  1:01   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 09/57] target/loongarch: Use gen_helper_gvec_2i for 2OP + imm " Song Gao
2023-09-10  1:03   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 10/57] target/loongarch: Replace CHECK_SXE to check_vec(ctx, 16) Song Gao
2023-09-10  1:04   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 11/57] target/loongarch: Add LASX data support Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 12/57] target/loongarch: check_vec support check LASX instructions Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 13/57] target/loongarch: Add avail_LASX to " Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 14/57] target/loongarch: Implement xvadd/xvsub Song Gao
2023-09-07 12:13   ` gaosong
2023-09-10  1:44   ` Richard Henderson
2023-09-11 12:27     ` gaosong
2023-09-07  8:31 ` [PATCH RESEND v5 15/57] target/loongarch: Implement xvreplgr2vr Song Gao
2023-09-10  1:46   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 16/57] target/loongarch: Implement xvaddi/xvsubi Song Gao
2023-09-10  1:50   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 17/57] target/loongarch: Implement xvneg Song Gao
2023-09-10  1:51   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 18/57] target/loongarch: Implement xvsadd/xvssub Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 19/57] target/loongarch: Implement xvhaddw/xvhsubw Song Gao
2023-09-11 21:20   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 20/57] target/loongarch: Implement xvaddw/xvsubw Song Gao
2023-09-11 21:25   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 21/57] target/loongarch: Implement xavg/xvagr Song Gao
2023-09-11 21:27   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 22/57] target/loongarch: Implement xvabsd Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 23/57] target/loongarch: Implement xvadda Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 24/57] target/loongarch: Implement xvmax/xvmin Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 25/57] target/loongarch: Implement xvmul/xvmuh/xvmulw{ev/od} Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 26/57] target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od} Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 27/57] target/loongarch; Implement xvdiv/xvmod Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 28/57] target/loongarch: Implement xvsat Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 29/57] target/loongarch: Implement xvexth Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 30/57] target/loongarch: Implement vext2xv Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 31/57] target/loongarch: Implement xvsigncov Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 32/57] target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 33/57] target/loognarch: Implement xvldi Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 34/57] target/loongarch: Implement LASX logic instructions Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 35/57] target/loongarch: Implement xvsll xvsrl xvsra xvrotr Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 36/57] target/loongarch: Implement xvsllwil xvextl Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 37/57] target/loongarch: Implement xvsrlr xvsrar Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 38/57] target/loongarch: Implement xvsrln xvsran Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 39/57] target/loongarch: Implement xvsrlrn xvsrarn Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 40/57] target/loongarch: Implement xvssrln xvssran Song Gao
2023-09-11 22:07   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 41/57] target/loongarch: Implement xvssrlrn xvssrarn Song Gao
2023-09-11 22:13   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 42/57] target/loongarch: Implement xvclo xvclz Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 43/57] target/loongarch: Implement xvpcnt Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 44/57] target/loongarch: Implement xvbitclr xvbitset xvbitrev Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 45/57] target/loongarch: Implement xvfrstp Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 46/57] target/loongarch: Implement LASX fpu arith instructions Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 47/57] target/loongarch: Implement LASX fpu fcvt instructions Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 48/57] target/loongarch: Implement xvseq xvsle xvslt Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 49/57] target/loongarch: Implement xvfcmp Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 50/57] target/loongarch: Implement xvbitsel xvset Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr Song Gao
2023-09-11 22:27   ` Richard Henderson
2023-09-12  9:09     ` gaosong
2023-09-12 16:20       ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 52/57] target/loongarch: Implement xvreplve xvinsve0 xvpickve Song Gao
2023-09-11 23:21   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 53/57] target/loongarch: Implement xvpack xvpick xvilv{l/h} Song Gao
2023-09-07  8:31 ` [PATCH RESEND v5 54/57] target/loongarch: Implement xvshuf xvperm{i} xvshuf4i Song Gao
2023-09-11 23:45   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 55/57] target/loongarch: Implement xvld xvst Song Gao
2023-09-11 23:47   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 56/57] target/loongarch: Move simply DO_XX marcos togther Song Gao
2023-09-11 23:48   ` Richard Henderson
2023-09-07  8:31 ` [PATCH RESEND v5 57/57] target/loongarch: CPUCFG support LASX 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).