[PATCH v3 00/12] target/hexagon: introduce idef-parser

Alessandro Di Federico via posted 12 patches 2 years, 12 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210330143750.3037824-1-ale.qemu@rev.ng
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Wainer dos Santos Moschetta <wainersm@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Alessandro Di Federico <ale@rev.ng>, Richard Henderson <richard.henderson@linaro.org>, Taylor Simpson <tsimpson@quicinc.com>, Thomas Huth <thuth@redhat.com>, Willian Rampazzo <willianr@redhat.com>
There is a newer version of this series
MAINTAINERS                                   |    8 +
include/tcg/tcg-cond.h                        |  101 +
include/tcg/tcg.h                             |   70 +-
target/hexagon/README                         |    5 +
target/hexagon/gen_idef_parser_funcs.py       |  114 +
target/hexagon/gen_tcg_funcs.py               |   28 +-
target/hexagon/genptr.c                       |  186 +-
target/hexagon/genptr.h                       |   23 +
target/hexagon/hex_common.py                  |   10 +
target/hexagon/idef-parser/README.rst         |  447 ++++
target/hexagon/idef-parser/idef-parser.h      |  240 ++
target/hexagon/idef-parser/idef-parser.lex    |  611 +++++
target/hexagon/idef-parser/idef-parser.y      |  940 +++++++
target/hexagon/idef-parser/macros.inc         |  150 ++
target/hexagon/idef-parser/parser-helpers.c   | 2230 +++++++++++++++++
target/hexagon/idef-parser/parser-helpers.h   |  344 +++
target/hexagon/idef-parser/prepare            |   24 +
target/hexagon/macros.h                       |   11 +-
target/hexagon/meson.build                    |   70 +-
target/hexagon/translate.c                    |    3 +-
target/hexagon/translate.h                    |    1 +
tests/docker/dockerfiles/alpine.docker        |    2 +
tests/docker/dockerfiles/centos7.docker       |    2 +
tests/docker/dockerfiles/centos8.docker       |    2 +
tests/docker/dockerfiles/debian10.docker      |    3 +
.../dockerfiles/fedora-i386-cross.docker      |    3 +
.../dockerfiles/fedora-win32-cross.docker     |    3 +
.../dockerfiles/fedora-win64-cross.docker     |    3 +
tests/docker/dockerfiles/fedora.docker        |    2 +
tests/docker/dockerfiles/opensuse-leap.docker |    2 +
tests/docker/dockerfiles/ubuntu.docker        |    3 +
tests/docker/dockerfiles/ubuntu1804.docker    |    3 +
tests/docker/dockerfiles/ubuntu2004.docker    |    5 +-
tests/tcg/hexagon/Makefile.target             |   35 +-
tests/tcg/hexagon/crt.S                       |   28 +
tests/tcg/hexagon/test_abs.S                  |   20 +
tests/tcg/hexagon/test_add.S                  |   20 +
tests/tcg/hexagon/test_andp.S                 |   23 +
tests/tcg/hexagon/test_bitcnt.S               |   42 +
tests/tcg/hexagon/test_bitsplit.S             |   25 +
tests/tcg/hexagon/test_call.S                 |   63 +
tests/tcg/hexagon/test_clobber.S              |   35 +
tests/tcg/hexagon/test_cmp.S                  |   34 +
tests/tcg/hexagon/test_cmpy.S                 |   31 +
tests/tcg/hexagon/test_djump.S                |   24 +
tests/tcg/hexagon/test_dotnew.S               |   39 +
tests/tcg/hexagon/test_dstore.S               |   29 +
tests/tcg/hexagon/test_ext.S                  |   18 +
tests/tcg/hexagon/test_fibonacci.S            |   33 +
tests/tcg/hexagon/test_hello.S                |   21 +
tests/tcg/hexagon/test_hl.S                   |   19 +
tests/tcg/hexagon/test_hwloops.S              |   25 +
tests/tcg/hexagon/test_jmp.S                  |   25 +
tests/tcg/hexagon/test_lsr.S                  |   39 +
tests/tcg/hexagon/test_mpyi.S                 |   20 +
tests/tcg/hexagon/test_packet.S               |   26 +
tests/tcg/hexagon/test_reorder.S              |   31 +
tests/tcg/hexagon/test_round.S                |   31 +
tests/tcg/hexagon/test_vavgw.S                |   33 +
tests/tcg/hexagon/test_vcmpb.S                |   32 +
tests/tcg/hexagon/test_vcmpw.S                |   29 +
tests/tcg/hexagon/test_vcmpy.S                |   50 +
tests/tcg/hexagon/test_vlsrw.S                |   23 +
tests/tcg/hexagon/test_vmaxh.S                |   37 +
tests/tcg/hexagon/test_vminh.S                |   37 +
tests/tcg/hexagon/test_vpmpyh.S               |   30 +
tests/tcg/hexagon/test_vspliceb.S             |   33 +
67 files changed, 6599 insertions(+), 90 deletions(-)
create mode 100644 include/tcg/tcg-cond.h
create mode 100644 target/hexagon/gen_idef_parser_funcs.py
create mode 100644 target/hexagon/idef-parser/README.rst
create mode 100644 target/hexagon/idef-parser/idef-parser.h
create mode 100644 target/hexagon/idef-parser/idef-parser.lex
create mode 100644 target/hexagon/idef-parser/idef-parser.y
create mode 100644 target/hexagon/idef-parser/macros.inc
create mode 100644 target/hexagon/idef-parser/parser-helpers.c
create mode 100644 target/hexagon/idef-parser/parser-helpers.h
create mode 100755 target/hexagon/idef-parser/prepare
create mode 100644 tests/tcg/hexagon/crt.S
create mode 100644 tests/tcg/hexagon/test_abs.S
create mode 100644 tests/tcg/hexagon/test_add.S
create mode 100644 tests/tcg/hexagon/test_andp.S
create mode 100644 tests/tcg/hexagon/test_bitcnt.S
create mode 100644 tests/tcg/hexagon/test_bitsplit.S
create mode 100644 tests/tcg/hexagon/test_call.S
create mode 100644 tests/tcg/hexagon/test_clobber.S
create mode 100644 tests/tcg/hexagon/test_cmp.S
create mode 100644 tests/tcg/hexagon/test_cmpy.S
create mode 100644 tests/tcg/hexagon/test_djump.S
create mode 100644 tests/tcg/hexagon/test_dotnew.S
create mode 100644 tests/tcg/hexagon/test_dstore.S
create mode 100644 tests/tcg/hexagon/test_ext.S
create mode 100644 tests/tcg/hexagon/test_fibonacci.S
create mode 100644 tests/tcg/hexagon/test_hello.S
create mode 100644 tests/tcg/hexagon/test_hl.S
create mode 100644 tests/tcg/hexagon/test_hwloops.S
create mode 100644 tests/tcg/hexagon/test_jmp.S
create mode 100644 tests/tcg/hexagon/test_lsr.S
create mode 100644 tests/tcg/hexagon/test_mpyi.S
create mode 100644 tests/tcg/hexagon/test_packet.S
create mode 100644 tests/tcg/hexagon/test_reorder.S
create mode 100644 tests/tcg/hexagon/test_round.S
create mode 100644 tests/tcg/hexagon/test_vavgw.S
create mode 100644 tests/tcg/hexagon/test_vcmpb.S
create mode 100644 tests/tcg/hexagon/test_vcmpw.S
create mode 100644 tests/tcg/hexagon/test_vcmpy.S
create mode 100644 tests/tcg/hexagon/test_vlsrw.S
create mode 100644 tests/tcg/hexagon/test_vmaxh.S
create mode 100644 tests/tcg/hexagon/test_vminh.S
create mode 100644 tests/tcg/hexagon/test_vpmpyh.S
create mode 100644 tests/tcg/hexagon/test_vspliceb.S
[PATCH v3 00/12] target/hexagon: introduce idef-parser
Posted by Alessandro Di Federico via 2 years, 12 months ago
From: Alessandro Di Federico <ale@rev.ng>

This patchset introduces the idef-parser for target/hexagon.

It's the third iteration of the patchset and includes fixes suggested
in the previous iteration.

`idef-parser` is a build-time tool built using flex and bison. Its aim
is to generate a large part of the tiny code generator frontend for
Hexagon. The prototype of idef-parser has been presented at KVM Forum
2019 ("QEMU-Hexagon: Automatic Translation of the ISA Manual Pseudcode
to Tiny Code Instructions"):

    https://www.youtube.com/watch?v=3EpnTYBOXCI

`target/hexagon/idef-parser/README.rst` provides an overview of the
parser and its inner working.

A couple of notes:

* `idef-parser` also supports certain things that are not used in the
  most recently submitted version of the "Hexagon patch
  series". However, they will be needed and stripping them out of the
  parser is quite a bit of work.
* checkpatch.pl complains on a single macro which has a trailing
  semi-colon, which is required.
* The build on the CI fails for the cross-i386-* jobs. This seems to be
  due to the fact that, despite we specified glib as a native
  dependency, meson still chooses the i386 bit version of the library,
  as opposed to the x86-64.
* This implementation no longer employs a conditional move to implement
  the ternary operator of the input language. We now employ proper
  control flow instructions (brcond). This is due to the fact that
  certain ternary expression have side effects. As a side effect, we had
  to switch from temporaries to local temporaries.

Alessandro Di Federico (5):
  tcg: expose TCGCond manipulation routines
  target/hexagon: update MAINTAINERS for idef-parser
  target/hexagon: import README for idef-parser
  target/hexagon: prepare input for the idef-parser
  target/hexagon: call idef-parser functions

Niccolò Izzo (2):
  target/hexagon: introduce new helper functions
  target/hexagon: import additional tests

Paolo Montesel (5):
  target/hexagon: make slot number an unsigned
  target/hexagon: make helper functions non-static
  target/hexagon: expose next PC in DisasContext
  target/hexagon: import lexer for idef-parser
  target/hexagon: import parser for idef-parser

 MAINTAINERS                                   |    8 +
 include/tcg/tcg-cond.h                        |  101 +
 include/tcg/tcg.h                             |   70 +-
 target/hexagon/README                         |    5 +
 target/hexagon/gen_idef_parser_funcs.py       |  114 +
 target/hexagon/gen_tcg_funcs.py               |   28 +-
 target/hexagon/genptr.c                       |  186 +-
 target/hexagon/genptr.h                       |   23 +
 target/hexagon/hex_common.py                  |   10 +
 target/hexagon/idef-parser/README.rst         |  447 ++++
 target/hexagon/idef-parser/idef-parser.h      |  240 ++
 target/hexagon/idef-parser/idef-parser.lex    |  611 +++++
 target/hexagon/idef-parser/idef-parser.y      |  940 +++++++
 target/hexagon/idef-parser/macros.inc         |  150 ++
 target/hexagon/idef-parser/parser-helpers.c   | 2230 +++++++++++++++++
 target/hexagon/idef-parser/parser-helpers.h   |  344 +++
 target/hexagon/idef-parser/prepare            |   24 +
 target/hexagon/macros.h                       |   11 +-
 target/hexagon/meson.build                    |   70 +-
 target/hexagon/translate.c                    |    3 +-
 target/hexagon/translate.h                    |    1 +
 tests/docker/dockerfiles/alpine.docker        |    2 +
 tests/docker/dockerfiles/centos7.docker       |    2 +
 tests/docker/dockerfiles/centos8.docker       |    2 +
 tests/docker/dockerfiles/debian10.docker      |    3 +
 .../dockerfiles/fedora-i386-cross.docker      |    3 +
 .../dockerfiles/fedora-win32-cross.docker     |    3 +
 .../dockerfiles/fedora-win64-cross.docker     |    3 +
 tests/docker/dockerfiles/fedora.docker        |    2 +
 tests/docker/dockerfiles/opensuse-leap.docker |    2 +
 tests/docker/dockerfiles/ubuntu.docker        |    3 +
 tests/docker/dockerfiles/ubuntu1804.docker    |    3 +
 tests/docker/dockerfiles/ubuntu2004.docker    |    5 +-
 tests/tcg/hexagon/Makefile.target             |   35 +-
 tests/tcg/hexagon/crt.S                       |   28 +
 tests/tcg/hexagon/test_abs.S                  |   20 +
 tests/tcg/hexagon/test_add.S                  |   20 +
 tests/tcg/hexagon/test_andp.S                 |   23 +
 tests/tcg/hexagon/test_bitcnt.S               |   42 +
 tests/tcg/hexagon/test_bitsplit.S             |   25 +
 tests/tcg/hexagon/test_call.S                 |   63 +
 tests/tcg/hexagon/test_clobber.S              |   35 +
 tests/tcg/hexagon/test_cmp.S                  |   34 +
 tests/tcg/hexagon/test_cmpy.S                 |   31 +
 tests/tcg/hexagon/test_djump.S                |   24 +
 tests/tcg/hexagon/test_dotnew.S               |   39 +
 tests/tcg/hexagon/test_dstore.S               |   29 +
 tests/tcg/hexagon/test_ext.S                  |   18 +
 tests/tcg/hexagon/test_fibonacci.S            |   33 +
 tests/tcg/hexagon/test_hello.S                |   21 +
 tests/tcg/hexagon/test_hl.S                   |   19 +
 tests/tcg/hexagon/test_hwloops.S              |   25 +
 tests/tcg/hexagon/test_jmp.S                  |   25 +
 tests/tcg/hexagon/test_lsr.S                  |   39 +
 tests/tcg/hexagon/test_mpyi.S                 |   20 +
 tests/tcg/hexagon/test_packet.S               |   26 +
 tests/tcg/hexagon/test_reorder.S              |   31 +
 tests/tcg/hexagon/test_round.S                |   31 +
 tests/tcg/hexagon/test_vavgw.S                |   33 +
 tests/tcg/hexagon/test_vcmpb.S                |   32 +
 tests/tcg/hexagon/test_vcmpw.S                |   29 +
 tests/tcg/hexagon/test_vcmpy.S                |   50 +
 tests/tcg/hexagon/test_vlsrw.S                |   23 +
 tests/tcg/hexagon/test_vmaxh.S                |   37 +
 tests/tcg/hexagon/test_vminh.S                |   37 +
 tests/tcg/hexagon/test_vpmpyh.S               |   30 +
 tests/tcg/hexagon/test_vspliceb.S             |   33 +
 67 files changed, 6599 insertions(+), 90 deletions(-)
 create mode 100644 include/tcg/tcg-cond.h
 create mode 100644 target/hexagon/gen_idef_parser_funcs.py
 create mode 100644 target/hexagon/idef-parser/README.rst
 create mode 100644 target/hexagon/idef-parser/idef-parser.h
 create mode 100644 target/hexagon/idef-parser/idef-parser.lex
 create mode 100644 target/hexagon/idef-parser/idef-parser.y
 create mode 100644 target/hexagon/idef-parser/macros.inc
 create mode 100644 target/hexagon/idef-parser/parser-helpers.c
 create mode 100644 target/hexagon/idef-parser/parser-helpers.h
 create mode 100755 target/hexagon/idef-parser/prepare
 create mode 100644 tests/tcg/hexagon/crt.S
 create mode 100644 tests/tcg/hexagon/test_abs.S
 create mode 100644 tests/tcg/hexagon/test_add.S
 create mode 100644 tests/tcg/hexagon/test_andp.S
 create mode 100644 tests/tcg/hexagon/test_bitcnt.S
 create mode 100644 tests/tcg/hexagon/test_bitsplit.S
 create mode 100644 tests/tcg/hexagon/test_call.S
 create mode 100644 tests/tcg/hexagon/test_clobber.S
 create mode 100644 tests/tcg/hexagon/test_cmp.S
 create mode 100644 tests/tcg/hexagon/test_cmpy.S
 create mode 100644 tests/tcg/hexagon/test_djump.S
 create mode 100644 tests/tcg/hexagon/test_dotnew.S
 create mode 100644 tests/tcg/hexagon/test_dstore.S
 create mode 100644 tests/tcg/hexagon/test_ext.S
 create mode 100644 tests/tcg/hexagon/test_fibonacci.S
 create mode 100644 tests/tcg/hexagon/test_hello.S
 create mode 100644 tests/tcg/hexagon/test_hl.S
 create mode 100644 tests/tcg/hexagon/test_hwloops.S
 create mode 100644 tests/tcg/hexagon/test_jmp.S
 create mode 100644 tests/tcg/hexagon/test_lsr.S
 create mode 100644 tests/tcg/hexagon/test_mpyi.S
 create mode 100644 tests/tcg/hexagon/test_packet.S
 create mode 100644 tests/tcg/hexagon/test_reorder.S
 create mode 100644 tests/tcg/hexagon/test_round.S
 create mode 100644 tests/tcg/hexagon/test_vavgw.S
 create mode 100644 tests/tcg/hexagon/test_vcmpb.S
 create mode 100644 tests/tcg/hexagon/test_vcmpw.S
 create mode 100644 tests/tcg/hexagon/test_vcmpy.S
 create mode 100644 tests/tcg/hexagon/test_vlsrw.S
 create mode 100644 tests/tcg/hexagon/test_vmaxh.S
 create mode 100644 tests/tcg/hexagon/test_vminh.S
 create mode 100644 tests/tcg/hexagon/test_vpmpyh.S
 create mode 100644 tests/tcg/hexagon/test_vspliceb.S

-- 
2.31.1


Re: [PATCH v3 00/12] target/hexagon: introduce idef-parser
Posted by no-reply@patchew.org 2 years, 12 months ago
Patchew URL: https://patchew.org/QEMU/20210330143750.3037824-1-ale.qemu@rev.ng/



Hi,

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

Type: series
Message-id: 20210330143750.3037824-1-ale.qemu@rev.ng
Subject: [PATCH v3 00/12] target/hexagon: introduce idef-parser

=== 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
   7993b0f..4a0ba67  master     -> master
 - [tag update]      patchew/20210325112941.365238-1-pbonzini@redhat.com -> patchew/20210325112941.365238-1-pbonzini@redhat.com
 - [tag update]      patchew/20210329110303.15235-1-alex.bennee@linaro.org -> patchew/20210329110303.15235-1-alex.bennee@linaro.org
 * [new tag]         patchew/20210330143750.3037824-1-ale.qemu@rev.ng -> patchew/20210330143750.3037824-1-ale.qemu@rev.ng
Switched to a new branch 'test'
0f8591b target/hexagon: import additional tests
937c6cf target/hexagon: call idef-parser functions
a86f74c target/hexagon: import parser for idef-parser
d1c0eea target/hexagon: import lexer for idef-parser
83ab86b target/hexagon: prepare input for the idef-parser
83b3488 target/hexagon: expose next PC in DisasContext
6ec869c target/hexagon: introduce new helper functions
c9b6a53 target/hexagon: make helper functions non-static
4fc7d90 target/hexagon: make slot number an unsigned
f62b717 target/hexagon: import README for idef-parser
d75567e target/hexagon: update MAINTAINERS for idef-parser
131fca8 tcg: expose TCGCond manipulation routines

=== OUTPUT BEGIN ===
1/12 Checking commit 131fca89f291 (tcg: expose TCGCond manipulation routines)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#19: 
new file mode 100644

total: 0 errors, 1 warnings, 183 lines checked

Patch 1/12 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/12 Checking commit d75567e8a276 (target/hexagon: update MAINTAINERS for idef-parser)
3/12 Checking commit f62b717c38c9 (target/hexagon: import README for idef-parser)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#38: 
new file mode 100644

total: 0 errors, 1 warnings, 464 lines checked

Patch 3/12 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/12 Checking commit 4fc7d902ffc6 (target/hexagon: make slot number an unsigned)
5/12 Checking commit c9b6a53db620 (target/hexagon: make helper functions non-static)
6/12 Checking commit 6ec869cf1437 (target/hexagon: introduce new helper functions)
7/12 Checking commit 83b3488172da (target/hexagon: expose next PC in DisasContext)
8/12 Checking commit 83ab86b500b4 (target/hexagon: prepare input for the idef-parser)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 316 lines checked

Patch 8/12 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/12 Checking commit d1c0eea89a02 (target/hexagon: import lexer for idef-parser)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#29: 
new file mode 100644

total: 0 errors, 1 warnings, 946 lines checked

Patch 9/12 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/12 Checking commit a86f74c8704d (target/hexagon: import parser for idef-parser)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#30: 
new file mode 100644

ERROR: suspicious ; after while (0)
#3314: FILE: target/hexagon/idef-parser/parser-helpers.h:98:
+    } while (0);

total: 1 errors, 1 warnings, 3681 lines checked

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

11/12 Checking commit 937c6cfff6d1 (target/hexagon: call idef-parser functions)
12/12 Checking commit 0f8591bf9641 (target/hexagon: import additional tests)
Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#99: 
new file mode 100644

total: 0 errors, 1 warnings, 1050 lines checked

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

Test command exited with code: 1


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