mbox series

[v3,00/44] target/arm: First slice of MVE implementation

Message ID 20210617121628.20116-1-peter.maydell@linaro.org
Headers show
Series target/arm: First slice of MVE implementation | expand

Message

Peter Maydell June 17, 2021, 12:15 p.m. UTC
This is the remainder of the MVE patches (a dozen or so are already
in git). All reviewed, except patches 1 and 2.

Changes v2->v3:
 * patches 1 and 2: pass MSIZE into DO_VLDR/DO_VSTR macros,
   so we increment the address by the correct amount for the
   widening/narrowing accesses. Increment the address outside
   the "only if predicated" condition.
 * patch 9: used the header file and renamed to tcg_gen_dup*.
   I also added in a tcg_gen_dup_tl #define.

thanks
-- PMM

Peter Maydell (44):
  target/arm: Implement MVE VLDR/VSTR (non-widening forms)
  target/arm: Implement widening/narrowing MVE VLDR/VSTR insns
  target/arm: Implement MVE VCLZ
  target/arm: Implement MVE VCLS
  target/arm: Implement MVE VREV16, VREV32, VREV64
  target/arm: Implement MVE VMVN (register)
  target/arm: Implement MVE VABS
  target/arm: Implement MVE VNEG
  tcg: Make gen_dup_i32/i64() public as tcg_gen_dup_i32/i64
  target/arm: Implement MVE VDUP
  target/arm: Implement MVE VAND, VBIC, VORR, VORN, VEOR
  target/arm: Implement MVE VADD, VSUB, VMUL
  target/arm: Implement MVE VMULH
  target/arm: Implement MVE VRMULH
  target/arm: Implement MVE VMAX, VMIN
  target/arm: Implement MVE VABD
  target/arm: Implement MVE VHADD, VHSUB
  target/arm: Implement MVE VMULL
  target/arm: Implement MVE VMLALDAV
  target/arm: Implement MVE VMLSLDAV
  target/arm: Implement MVE VRMLALDAVH, VRMLSLDAVH
  target/arm: Implement MVE VADD (scalar)
  target/arm: Implement MVE VSUB, VMUL (scalar)
  target/arm: Implement MVE VHADD, VHSUB (scalar)
  target/arm: Implement MVE VBRSR
  target/arm: Implement MVE VPST
  target/arm: Implement MVE VQADD and VQSUB
  target/arm: Implement MVE VQDMULH and VQRDMULH (scalar)
  target/arm: Implement MVE VQDMULL scalar
  target/arm: Implement MVE VQDMULH, VQRDMULH (vector)
  target/arm: Implement MVE VQADD, VQSUB (vector)
  target/arm: Implement MVE VQSHL (vector)
  target/arm: Implement MVE VQRSHL
  target/arm: Implement MVE VSHL insn
  target/arm: Implmement MVE VRSHL
  target/arm: Implement MVE VQDMLADH and VQRDMLADH
  target/arm: Implement MVE VQDMLSDH and VQRDMLSDH
  target/arm: Implement MVE VQDMULL (vector)
  target/arm: Implement MVE VRHADD
  target/arm: Implement MVE VADC, VSBC
  target/arm: Implement MVE VCADD
  target/arm: Implement MVE VHCADD
  target/arm: Implement MVE VADDV
  target/arm: Make VMOV scalar <-> gpreg beatwise for MVE

 include/tcg/tcg-op.h       |    8 +
 include/tcg/tcg.h          |    1 -
 target/arm/helper-mve.h    |  357 +++++++++++
 target/arm/helper.h        |    2 +
 target/arm/internals.h     |   11 +
 target/arm/translate-a32.h |    2 +
 target/arm/translate.h     |   10 +
 target/arm/mve.decode      |  240 ++++++++
 target/arm/mve_helper.c    | 1175 ++++++++++++++++++++++++++++++++++++
 target/arm/translate-mve.c |  759 +++++++++++++++++++++++
 target/arm/translate-vfp.c |   77 ++-
 tcg/tcg-op-gvec.c          |   20 +-
 target/arm/meson.build     |    1 +
 13 files changed, 2646 insertions(+), 17 deletions(-)
 create mode 100644 target/arm/helper-mve.h
 create mode 100644 target/arm/mve_helper.c

Comments

no-reply@patchew.org June 17, 2021, 1:10 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20210617121628.20116-1-peter.maydell@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210617121628.20116-1-peter.maydell@linaro.org
Subject: [PATCH v3 00/44] target/arm: First slice of MVE implementation

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210617121628.20116-1-peter.maydell@linaro.org -> patchew/20210617121628.20116-1-peter.maydell@linaro.org
 * [new tag]         patchew/20210617121707.764126-1-ma.mandourr@gmail.com -> patchew/20210617121707.764126-1-ma.mandourr@gmail.com
Switched to a new branch 'test'
05df1c8 target/arm: Make VMOV scalar <-> gpreg beatwise for MVE
65752fa target/arm: Implement MVE VADDV
bf834ec target/arm: Implement MVE VHCADD
93db630 target/arm: Implement MVE VCADD
ac96c96 target/arm: Implement MVE VADC, VSBC
8a4ab6f target/arm: Implement MVE VRHADD
82a131d target/arm: Implement MVE VQDMULL (vector)
b3077d8 target/arm: Implement MVE VQDMLSDH and VQRDMLSDH
4b7d18e target/arm: Implement MVE VQDMLADH and VQRDMLADH
7362ba8 target/arm: Implmement MVE VRSHL
35ceb3b target/arm: Implement MVE VSHL insn
0b69db0 target/arm: Implement MVE VQRSHL
ca1f8f8 target/arm: Implement MVE VQSHL (vector)
3145d27 target/arm: Implement MVE VQADD, VQSUB (vector)
c410f56 target/arm: Implement MVE VQDMULH, VQRDMULH (vector)
9ed75aa target/arm: Implement MVE VQDMULL scalar
b978ab7 target/arm: Implement MVE VQDMULH and VQRDMULH (scalar)
6152a27 target/arm: Implement MVE VQADD and VQSUB
9b3c980 target/arm: Implement MVE VPST
c474543 target/arm: Implement MVE VBRSR
f7f3767 target/arm: Implement MVE VHADD, VHSUB (scalar)
b3437bd target/arm: Implement MVE VSUB, VMUL (scalar)
fc9793a target/arm: Implement MVE VADD (scalar)
80b9d87 target/arm: Implement MVE VRMLALDAVH, VRMLSLDAVH
faaf640 target/arm: Implement MVE VMLSLDAV
80faaa9 target/arm: Implement MVE VMLALDAV
3e8af8c target/arm: Implement MVE VMULL
abae671 target/arm: Implement MVE VHADD, VHSUB
adb7e20b target/arm: Implement MVE VABD
bb75c1e target/arm: Implement MVE VMAX, VMIN
ff40dea target/arm: Implement MVE VRMULH
dc29f67 target/arm: Implement MVE VMULH
fa7718c target/arm: Implement MVE VADD, VSUB, VMUL
4dddf39 target/arm: Implement MVE VAND, VBIC, VORR, VORN, VEOR
438a591 target/arm: Implement MVE VDUP
8d7b370 tcg: Make gen_dup_i32/i64() public as tcg_gen_dup_i32/i64
dca2cd3 target/arm: Implement MVE VNEG
052d280 target/arm: Implement MVE VABS
991de50 target/arm: Implement MVE VMVN (register)
0d21b85 target/arm: Implement MVE VREV16, VREV32, VREV64
cdfb89a target/arm: Implement MVE VCLS
276f4bc target/arm: Implement MVE VCLZ
72caa75 target/arm: Implement widening/narrowing MVE VLDR/VSTR insns
b0b9cc6 target/arm: Implement MVE VLDR/VSTR (non-widening forms)

=== OUTPUT BEGIN ===
1/44 Checking commit b0b9cc6091e7 (target/arm: Implement MVE VLDR/VSTR (non-widening forms))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#269: FILE: target/arm/mve_helper.c:134:
+        /*                                                              \

total: 0 errors, 2 warnings, 370 lines checked

Patch 1/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/44 Checking commit 72caa75f6422 (target/arm: Implement widening/narrowing MVE VLDR/VSTR insns)
3/44 Checking commit 276f4bcceaa3 (target/arm: Implement MVE VCLZ)
WARNING: architecture specific defines should be avoided
#132: FILE: target/arm/mve_helper.c:241:
+#if defined(__OPTIMIZE__) && !defined(__SANITIZE_ADDRESS__)

ERROR: externs should be avoided in .c files
#133: FILE: target/arm/mve_helper.c:242:
+void unknown_mergemask_type(void *d, uint64_t r, uint16_t mask);

ERROR: spaces required around that '*' (ctx:WxV)
#189: FILE: target/arm/translate-mve.c:165:
+static bool do_1op(DisasContext *s, arg_1op *a, MVEGenOneOpFn fn)
                                             ^

ERROR: spaces required around that '*' (ctx:WxV)
#213: FILE: target/arm/translate-mve.c:189:
+    static bool trans_##INSN(DisasContext *s, arg_1op *a)       \
                                                       ^

total: 3 errors, 1 warnings, 178 lines checked

Patch 3/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/44 Checking commit cdfb89ab595d (target/arm: Implement MVE VCLS)
5/44 Checking commit 0d21b856208c (target/arm: Implement MVE VREV16, VREV32, VREV64)
ERROR: spaces required around that '*' (ctx:WxV)
#70: FILE: target/arm/translate-mve.c:203:
+static bool trans_VREV16(DisasContext *s, arg_1op *a)
                                                   ^

total: 1 errors, 0 warnings, 63 lines checked

Patch 5/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/44 Checking commit 991de50aac90 (target/arm: Implement MVE VMVN (register))
7/44 Checking commit 052d2804b06d (target/arm: Implement MVE VABS)
8/44 Checking commit dca2cd34d97c (target/arm: Implement MVE VNEG)
9/44 Checking commit 8d7b370ed2e2 (tcg: Make gen_dup_i32/i64() public as tcg_gen_dup_i32/i64)
10/44 Checking commit 438a5912078d (target/arm: Implement MVE VDUP)
ERROR: spaces required around that '*' (ctx:WxV)
#94: FILE: target/arm/translate-mve.c:165:
+static bool trans_VDUP(DisasContext *s, arg_VDUP *a)
                                                  ^

total: 1 errors, 0 warnings, 82 lines checked

Patch 10/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

11/44 Checking commit 4dddf398aa17 (target/arm: Implement MVE VAND, VBIC, VORR, VORN, VEOR)
12/44 Checking commit fa7718cb7cf8 (target/arm: Implement MVE VADD, VSUB, VMUL)
13/44 Checking commit dc29f673ff69 (target/arm: Implement MVE VMULH)
14/44 Checking commit ff40deadf8ae (target/arm: Implement MVE VRMULH)
15/44 Checking commit bb75c1e3dbb5 (target/arm: Implement MVE VMAX, VMIN)
16/44 Checking commit adb7e20b5212 (target/arm: Implement MVE VABD)
17/44 Checking commit abae671c698f (target/arm: Implement MVE VHADD, VHSUB)
18/44 Checking commit 3e8af8c244d0 (target/arm: Implement MVE VMULL)
WARNING: line over 80 characters
#72: FILE: target/arm/mve_helper.c:373:
+    void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, void *vm) \

total: 0 errors, 1 warnings, 81 lines checked

Patch 18/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
19/44 Checking commit 80faaa90c1e0 (target/arm: Implement MVE VMLALDAV)
ERROR: spaces required around that '+=' (ctx:WxB)
#96: FILE: target/arm/mve_helper.c:533:
+DO_LDAV(vmlaldavsh, 2, int16_t, false, +=, +=)
                                            ^

ERROR: spaces required around that '+=' (ctx:WxB)
#97: FILE: target/arm/mve_helper.c:534:
+DO_LDAV(vmlaldavxsh, 2, int16_t, true, +=, +=)
                                            ^

ERROR: spaces required around that '+=' (ctx:WxB)
#98: FILE: target/arm/mve_helper.c:535:
+DO_LDAV(vmlaldavsw, 4, int32_t, false, +=, +=)
                                            ^

ERROR: spaces required around that '+=' (ctx:WxB)
#99: FILE: target/arm/mve_helper.c:536:
+DO_LDAV(vmlaldavxsw, 4, int32_t, true, +=, +=)
                                            ^

ERROR: spaces required around that '+=' (ctx:WxB)
#101: FILE: target/arm/mve_helper.c:538:
+DO_LDAV(vmlaldavuh, 2, uint16_t, false, +=, +=)
                                             ^

ERROR: spaces required around that '+=' (ctx:WxB)
#102: FILE: target/arm/mve_helper.c:539:
+DO_LDAV(vmlaldavuw, 4, uint32_t, false, +=, +=)
                                             ^

WARNING: line over 80 characters
#111: FILE: target/arm/translate-mve.c:34:
+typedef void MVEGenDualAccOpFn(TCGv_i64, TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_i64);

ERROR: spaces required around that '*' (ctx:WxV)
#143: FILE: target/arm/translate-mve.c:386:
+static bool do_long_dual_acc(DisasContext *s, arg_vmlaldav *a,
                                                            ^

total: 7 errors, 1 warnings, 199 lines checked

Patch 19/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

20/44 Checking commit faaf640d3bc9 (target/arm: Implement MVE VMLSLDAV)
ERROR: spaces required around that '-=' (ctx:WxB)
#53: FILE: target/arm/mve_helper.c:541:
+DO_LDAV(vmlsldavsh, 2, int16_t, false, +=, -=)
                                            ^

ERROR: spaces required around that '-=' (ctx:WxB)
#54: FILE: target/arm/mve_helper.c:542:
+DO_LDAV(vmlsldavxsh, 2, int16_t, true, +=, -=)
                                            ^

ERROR: spaces required around that '-=' (ctx:WxB)
#55: FILE: target/arm/mve_helper.c:543:
+DO_LDAV(vmlsldavsw, 4, int32_t, false, +=, -=)
                                            ^

ERROR: spaces required around that '-=' (ctx:WxB)
#56: FILE: target/arm/mve_helper.c:544:
+DO_LDAV(vmlsldavxsw, 4, int32_t, true, +=, -=)
                                            ^

total: 4 errors, 0 warnings, 35 lines checked

Patch 20/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

21/44 Checking commit 80b9d8746ba4 (target/arm: Implement MVE VRMLALDAVH, VRMLSLDAVH)
WARNING: line over 80 characters
#102: FILE: target/arm/mve_helper.c:575:
+DO_LDAVH(vrmlaldavhsw, 4, int32_t, false, int128_add, int128_add, int128_makes64)

WARNING: line over 80 characters
#103: FILE: target/arm/mve_helper.c:576:
+DO_LDAVH(vrmlaldavhxsw, 4, int32_t, true, int128_add, int128_add, int128_makes64)

WARNING: line over 80 characters
#105: FILE: target/arm/mve_helper.c:578:
+DO_LDAVH(vrmlaldavhuw, 4, uint32_t, false, int128_add, int128_add, int128_make64)

WARNING: line over 80 characters
#107: FILE: target/arm/mve_helper.c:580:
+DO_LDAVH(vrmlsldavhsw, 4, int32_t, false, int128_add, int128_sub, int128_makes64)

WARNING: line over 80 characters
#108: FILE: target/arm/mve_helper.c:581:
+DO_LDAVH(vrmlsldavhxsw, 4, int32_t, true, int128_add, int128_sub, int128_makes64)

total: 0 errors, 5 warnings, 98 lines checked

Patch 21/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
22/44 Checking commit fc9793a5738e (target/arm: Implement MVE VADD (scalar))
ERROR: spaces required around that '*' (ctx:WxV)
#113: FILE: target/arm/translate-mve.c:387:
+static bool do_2op_scalar(DisasContext *s, arg_2scalar *a,
                                                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#144: FILE: target/arm/translate-mve.c:418:
+    static bool trans_##INSN(DisasContext *s, arg_2scalar *a)   \
                                                           ^

total: 2 errors, 0 warnings, 117 lines checked

Patch 22/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

23/44 Checking commit b3437bdf3abb (target/arm: Implement MVE VSUB, VMUL (scalar))
24/44 Checking commit f7f37673447d (target/arm: Implement MVE VHADD, VHSUB (scalar))
25/44 Checking commit c47454330f08 (target/arm: Implement MVE VBRSR)
26/44 Checking commit 9b3c980c3831 (target/arm: Implement MVE VPST)
27/44 Checking commit 6152a27ffd3a (target/arm: Implement MVE VQADD and VQSUB)
28/44 Checking commit b978ab74d254 (target/arm: Implement MVE VQDMULH and VQRDMULH (scalar))
WARNING: line over 80 characters
#29: FILE: target/arm/helper-mve.h:192:
+DEF_HELPER_FLAGS_4(mve_vqdmulh_scalarb, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#30: FILE: target/arm/helper-mve.h:193:
+DEF_HELPER_FLAGS_4(mve_vqdmulh_scalarh, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#31: FILE: target/arm/helper-mve.h:194:
+DEF_HELPER_FLAGS_4(mve_vqdmulh_scalarw, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#33: FILE: target/arm/helper-mve.h:196:
+DEF_HELPER_FLAGS_4(mve_vqrdmulh_scalarb, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#34: FILE: target/arm/helper-mve.h:197:
+DEF_HELPER_FLAGS_4(mve_vqrdmulh_scalarh, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#35: FILE: target/arm/helper-mve.h:198:
+DEF_HELPER_FLAGS_4(mve_vqrdmulh_scalarw, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

total: 0 errors, 6 warnings, 68 lines checked

Patch 28/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
29/44 Checking commit 9ed75aa1afab (target/arm: Implement MVE VQDMULL scalar)
WARNING: line over 80 characters
#32: FILE: target/arm/helper-mve.h:204:
+DEF_HELPER_FLAGS_4(mve_vqdmullb_scalarh, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#33: FILE: target/arm/helper-mve.h:205:
+DEF_HELPER_FLAGS_4(mve_vqdmullb_scalarw, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#34: FILE: target/arm/helper-mve.h:206:
+DEF_HELPER_FLAGS_4(mve_vqdmullt_scalarh, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

WARNING: line over 80 characters
#35: FILE: target/arm/helper-mve.h:207:
+DEF_HELPER_FLAGS_4(mve_vqdmullt_scalarw, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)

ERROR: spaces required around that '*' (ctx:WxV)
#177: FILE: target/arm/translate-mve.c:457:
+static bool trans_VQDMULLB_scalar(DisasContext *s, arg_2scalar *a)
                                                                ^

total: 1 errors, 4 warnings, 164 lines checked

Patch 29/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

30/44 Checking commit c410f56ad8c1 (target/arm: Implement MVE VQDMULH, VQRDMULH (vector))
WARNING: line over 80 characters
#61: FILE: target/arm/mve_helper.c:389:
+    void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, void *vm) \

total: 0 errors, 1 warnings, 70 lines checked

Patch 30/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/44 Checking commit 3145d274607e (target/arm: Implement MVE VQADD, VQSUB (vector))
32/44 Checking commit ca1f8f85cdc3 (target/arm: Implement MVE VQSHL (vector))
33/44 Checking commit 0b69db053062 (target/arm: Implement MVE VQRSHL)
34/44 Checking commit 35ceb3be9831 (target/arm: Implement MVE VSHL insn)
35/44 Checking commit 7362ba87bc30 (target/arm: Implmement MVE VRSHL)
36/44 Checking commit 4b7d18e6fd47 (target/arm: Implement MVE VQDMLADH and VQRDMLADH)
37/44 Checking commit b3077d835663 (target/arm: Implement MVE VQDMLSDH and VQRDMLSDH)
38/44 Checking commit 82a131d12edc (target/arm: Implement MVE VQDMULL (vector))
39/44 Checking commit 8a4ab6fea713 (target/arm: Implement MVE VRHADD)
40/44 Checking commit ac96c96b9da5 (target/arm: Implement MVE VADC, VSBC)
41/44 Checking commit 93db630422fc (target/arm: Implement MVE VCADD)
WARNING: line over 80 characters
#74: FILE: target/arm/mve_helper.c:608:
+    void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, void *vm) \

WARNING: Block comments use a leading /* on a separate line
#80: FILE: target/arm/mve_helper.c:614:
+        /* Calculate all results first to avoid overwriting inputs */   \

total: 0 errors, 2 warnings, 78 lines checked

Patch 41/44 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
42/44 Checking commit bf834ec2db9b (target/arm: Implement MVE VHCADD)
43/44 Checking commit 65752faf2000 (target/arm: Implement MVE VADDV)
44/44 Checking commit 05df1c8640c0 (target/arm: Make VMOV scalar <-> gpreg beatwise for MVE)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210617121628.20116-1-peter.maydell@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com