[PATCH v8 00/35] Hexagon patch series

Taylor Simpson posted 35 patches 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1612763186-18161-1-git-send-email-tsimpson@quicinc.com
default-configs/targets/hexagon-linux-user.mak     |    1 +
meson.build                                        |    1 +
include/disas/dis-asm.h                            |    1 +
include/elf.h                                      |    1 +
linux-user/hexagon/sockbits.h                      |   18 +
linux-user/hexagon/syscall_nr.h                    |  322 +++
linux-user/hexagon/target_cpu.h                    |   44 +
linux-user/hexagon/target_elf.h                    |   40 +
linux-user/hexagon/target_fcntl.h                  |   18 +
linux-user/hexagon/target_signal.h                 |   34 +
linux-user/hexagon/target_structs.h                |   54 +
linux-user/hexagon/target_syscall.h                |   36 +
linux-user/hexagon/termbits.h                      |   18 +
linux-user/qemu.h                                  |    2 +
linux-user/syscall_defs.h                          |   33 +
target/hexagon/arch.h                              |   34 +
target/hexagon/attribs.h                           |   35 +
target/hexagon/conv_emu.h                          |   31 +
target/hexagon/cpu-param.h                         |   29 +
target/hexagon/cpu.h                               |  159 ++
target/hexagon/cpu_bits.h                          |   58 +
target/hexagon/decode.h                            |   32 +
target/hexagon/fma_emu.h                           |   36 +
target/hexagon/gen_tcg.h                           |  319 +++
target/hexagon/genptr.h                            |   25 +
target/hexagon/helper.h                            |   88 +
target/hexagon/hex_arch_types.h                    |   38 +
target/hexagon/hex_regs.h                          |   83 +
target/hexagon/iclass.h                            |   50 +
target/hexagon/insn.h                              |   74 +
target/hexagon/internal.h                          |   37 +
target/hexagon/macros.h                            |  592 ++++++
target/hexagon/opcodes.h                           |   58 +
target/hexagon/printinsn.h                         |   27 +
target/hexagon/reg_fields.h                        |   36 +
target/hexagon/translate.h                         |   93 +
target/hexagon/attribs_def.h.inc                   |   97 +
target/hexagon/reg_fields_def.h.inc                |   41 +
disas/hexagon.c                                    |   65 +
linux-user/elfload.c                               |   16 +
linux-user/hexagon/cpu_loop.c                      |  100 +
linux-user/hexagon/signal.c                        |  276 +++
target/hexagon/arch.c                              |  300 +++
target/hexagon/conv_emu.c                          |  177 ++
target/hexagon/cpu.c                               |  318 +++
target/hexagon/decode.c                            |  957 +++++++++
target/hexagon/fma_emu.c                           |  702 +++++++
target/hexagon/gdbstub.c                           |   47 +
target/hexagon/gen_dectree_import.c                |  188 ++
target/hexagon/gen_semantics.c                     |   88 +
target/hexagon/genptr.c                            |  331 +++
target/hexagon/iclass.c                            |   73 +
target/hexagon/op_helper.c                         | 1064 ++++++++++
target/hexagon/opcodes.c                           |  142 ++
target/hexagon/printinsn.c                         |  146 ++
target/hexagon/reg_fields.c                        |   27 +
target/hexagon/translate.c                         |  748 +++++++
tests/tcg/hexagon/atomics.c                        |  139 ++
tests/tcg/hexagon/dual_stores.c                    |   60 +
tests/tcg/hexagon/fpstuff.c                        |  370 ++++
tests/tcg/hexagon/mem_noshuf.c                     |  328 +++
tests/tcg/hexagon/misc.c                           |  380 ++++
tests/tcg/hexagon/preg_alias.c                     |  169 ++
MAINTAINERS                                        |    9 +
disas/meson.build                                  |    1 +
scripts/gensyscalls.sh                             |    1 +
scripts/qemu-binfmt-conf.sh                        |    6 +-
target/hexagon/README                              |  235 +++
target/hexagon/dectree.py                          |  351 ++++
target/hexagon/gen_helper_funcs.py                 |  220 ++
target/hexagon/gen_helper_protos.py                |  150 ++
target/hexagon/gen_op_attribs.py                   |   39 +
target/hexagon/gen_op_regs.py                      |  110 +
target/hexagon/gen_opcodes_def.py                  |   36 +
target/hexagon/gen_printinsn.py                    |  173 ++
target/hexagon/gen_shortcode.py                    |   60 +
target/hexagon/gen_tcg_func_table.py               |   58 +
target/hexagon/gen_tcg_funcs.py                    |  485 +++++
target/hexagon/hex_common.py                       |  234 +++
target/hexagon/imported/allidefs.def               |   30 +
target/hexagon/imported/alu.idef                   | 1258 ++++++++++++
target/hexagon/imported/branch.idef                |  326 +++
target/hexagon/imported/compare.idef               |  619 ++++++
target/hexagon/imported/encode.def                 |  124 ++
target/hexagon/imported/encode_pp.def              | 2110 ++++++++++++++++++++
target/hexagon/imported/encode_subinsn.def         |  149 ++
target/hexagon/imported/float.idef                 |  312 +++
target/hexagon/imported/iclass.def                 |   51 +
target/hexagon/imported/ldst.idef                  |  286 +++
target/hexagon/imported/macros.def                 | 1531 ++++++++++++++
target/hexagon/imported/mpy.idef                   | 1208 +++++++++++
target/hexagon/imported/shift.idef                 | 1066 ++++++++++
target/hexagon/imported/subinsns.idef              |  149 ++
target/hexagon/imported/system.idef                |   68 +
target/hexagon/meson.build                         |  193 ++
target/meson.build                                 |    1 +
.../debian-hexagon-cross-build-local.docker        |   18 +
.../debian-hexagon-cross.build-toolchain.sh        |  141 ++
.../docker/dockerfiles/debian-hexagon-cross.docker |    1 +
tests/tcg/configure.sh                             |    8 +-
tests/tcg/hexagon/Makefile.target                  |   46 +
tests/tcg/hexagon/first.S                          |   56 +
tests/tcg/hexagon/float_convs.ref                  |  748 +++++++
tests/tcg/hexagon/float_madds.ref                  |  768 +++++++
104 files changed, 23339 insertions(+), 2 deletions(-)
create mode 100644 default-configs/targets/hexagon-linux-user.mak
create mode 100644 linux-user/hexagon/sockbits.h
create mode 100644 linux-user/hexagon/syscall_nr.h
create mode 100644 linux-user/hexagon/target_cpu.h
create mode 100644 linux-user/hexagon/target_elf.h
create mode 100644 linux-user/hexagon/target_fcntl.h
create mode 100644 linux-user/hexagon/target_signal.h
create mode 100644 linux-user/hexagon/target_structs.h
create mode 100644 linux-user/hexagon/target_syscall.h
create mode 100644 linux-user/hexagon/termbits.h
create mode 100644 target/hexagon/arch.h
create mode 100644 target/hexagon/attribs.h
create mode 100644 target/hexagon/conv_emu.h
create mode 100644 target/hexagon/cpu-param.h
create mode 100644 target/hexagon/cpu.h
create mode 100644 target/hexagon/cpu_bits.h
create mode 100644 target/hexagon/decode.h
create mode 100644 target/hexagon/fma_emu.h
create mode 100644 target/hexagon/gen_tcg.h
create mode 100644 target/hexagon/genptr.h
create mode 100644 target/hexagon/helper.h
create mode 100644 target/hexagon/hex_arch_types.h
create mode 100644 target/hexagon/hex_regs.h
create mode 100644 target/hexagon/iclass.h
create mode 100644 target/hexagon/insn.h
create mode 100644 target/hexagon/internal.h
create mode 100644 target/hexagon/macros.h
create mode 100644 target/hexagon/opcodes.h
create mode 100644 target/hexagon/printinsn.h
create mode 100644 target/hexagon/reg_fields.h
create mode 100644 target/hexagon/translate.h
create mode 100644 target/hexagon/attribs_def.h.inc
create mode 100644 target/hexagon/reg_fields_def.h.inc
create mode 100644 disas/hexagon.c
create mode 100644 linux-user/hexagon/cpu_loop.c
create mode 100644 linux-user/hexagon/signal.c
create mode 100644 target/hexagon/arch.c
create mode 100644 target/hexagon/conv_emu.c
create mode 100644 target/hexagon/cpu.c
create mode 100644 target/hexagon/decode.c
create mode 100644 target/hexagon/fma_emu.c
create mode 100644 target/hexagon/gdbstub.c
create mode 100644 target/hexagon/gen_dectree_import.c
create mode 100644 target/hexagon/gen_semantics.c
create mode 100644 target/hexagon/genptr.c
create mode 100644 target/hexagon/iclass.c
create mode 100644 target/hexagon/op_helper.c
create mode 100644 target/hexagon/opcodes.c
create mode 100644 target/hexagon/printinsn.c
create mode 100644 target/hexagon/reg_fields.c
create mode 100644 target/hexagon/translate.c
create mode 100644 tests/tcg/hexagon/atomics.c
create mode 100644 tests/tcg/hexagon/dual_stores.c
create mode 100644 tests/tcg/hexagon/fpstuff.c
create mode 100644 tests/tcg/hexagon/mem_noshuf.c
create mode 100644 tests/tcg/hexagon/misc.c
create mode 100644 tests/tcg/hexagon/preg_alias.c
create mode 100644 target/hexagon/README
create mode 100755 target/hexagon/dectree.py
create mode 100755 target/hexagon/gen_helper_funcs.py
create mode 100755 target/hexagon/gen_helper_protos.py
create mode 100755 target/hexagon/gen_op_attribs.py
create mode 100755 target/hexagon/gen_op_regs.py
create mode 100755 target/hexagon/gen_opcodes_def.py
create mode 100755 target/hexagon/gen_printinsn.py
create mode 100755 target/hexagon/gen_shortcode.py
create mode 100755 target/hexagon/gen_tcg_func_table.py
create mode 100755 target/hexagon/gen_tcg_funcs.py
create mode 100755 target/hexagon/hex_common.py
create mode 100644 target/hexagon/imported/allidefs.def
create mode 100644 target/hexagon/imported/alu.idef
create mode 100644 target/hexagon/imported/branch.idef
create mode 100644 target/hexagon/imported/compare.idef
create mode 100644 target/hexagon/imported/encode.def
create mode 100644 target/hexagon/imported/encode_pp.def
create mode 100644 target/hexagon/imported/encode_subinsn.def
create mode 100644 target/hexagon/imported/float.idef
create mode 100644 target/hexagon/imported/iclass.def
create mode 100644 target/hexagon/imported/ldst.idef
create mode 100755 target/hexagon/imported/macros.def
create mode 100644 target/hexagon/imported/mpy.idef
create mode 100644 target/hexagon/imported/shift.idef
create mode 100644 target/hexagon/imported/subinsns.idef
create mode 100644 target/hexagon/imported/system.idef
create mode 100644 target/hexagon/meson.build
create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross-build-local.docker
create mode 100755 tests/docker/dockerfiles/debian-hexagon-cross.build-toolchain.sh
create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross.docker
create mode 100644 tests/tcg/hexagon/Makefile.target
create mode 100644 tests/tcg/hexagon/first.S
create mode 100644 tests/tcg/hexagon/float_convs.ref
create mode 100644 tests/tcg/hexagon/float_madds.ref
[PATCH v8 00/35] Hexagon patch series
Posted by Taylor Simpson 3 years, 2 months ago
This series adds support for the Hexagon processor with Linux user support

See patch 02 Hexagon README for detailed information.

This series assumes int128_or() is implemented.
https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg06004.html

The series is also available at https://github.com/quic/qemu on branch
small_series_v8.


Once the series is applied, the Hexagon port will pass "make check-tcg".
The series also includes Hexagon-specific tests in tcg/tests/hexagon.

The final patch in the series add docker support.  Thanks to Alessandro
Di Federico <ale@rev.ng> and Brian Cain <bcain@quicinc.com> for making this
happen.  The default container (debian-hexagon-cross) uses a toolchain built
by rev.ng.  Alternatively, there is a container that will build the toolchain
locally (debian-hexagon-cross-build-local).

Here are the commands to verify the code:
    mkdir build
    cd build
    ../configure --target-list=hexagon-linux-user
    make
    make check-tcg


*** Known checkpatch issues ***

The following are known checkpatch errors in the series
    target/hexagon/reg_fields.h         Complex macro
    target/hexagon/attribs.h            Complex macro
    target/hexagon/decode.c             Complex macro
    target/hexagon/decode.c             Macro needs do - while
    target/hexagon/printinsn.c          Macro needs do - while
    target/hexagon/gen_semantics.c      Suspicious ; after while (0)
    target/hexagon/gen_dectree_import.c Complex macro
    target/hexagon/gen_dectree_import.c Suspicious ; after while (0)
    target/hexagon/opcodes.c            Complex macro
    target/hexagon/iclass.h             Complex macro
    configure.sh                        Line over 90 characters
    tests/tcg/configure.sh              Line over 90 characters
    scripts/qemu-binfmt-conf.sh         Line over 90 characters

The following are known checkpatch warnings in the series
    target/hexagon/fma_emu.c            Comments inside macro definition
    target/hexagon/gen_tcg_funcs.py     Line over 80 characters
    scripts/qemu-binfmt-conf.sh         Line over 80 characters

*** Changes in v8 ***
Address feedback from  Philippe Mathieu-Daud� <f4bug@amsat.org>
    Make RAISE_FP_EXCEPTION conditional on CONFIG_USER_ONLY
    Enable build in 32-bit mode
    Remove extern from function prototypes in header files
    Fixed issues running under gitlab-ci
    Use qemu .inc file naming convention

Address feedback from Richard Henderson <<richard.henderson@linaro.org>
    Don't set PC at the beginning of every packet
    Don't set slot_cancelled at the beginning of every packet
    Don't set pred_written at the beginning of every packet
    Only update execution counters at the end of TB

Reduce the amount of code that gets compiled when HEX_DEBUG is off

Fix bug uncovered in sanitizers-enabled build
Fix bug uncovered in clang build

*** Changes in v7 ***
Address feedback from  Philippe Mathieu-Daud� <f4bug@amsat.org>
    Update copyright to 2021
    Use GString instead of <string.h> for disassembly
    Remove mixed declarations (interleaving statements and declarations)
    Change 4 to sizeof(uint32_t)

Address feedback from  Alex Benn�e <alex.bennee@linaro.org>
    Break TCG tests patch into multiple patches
    Remove pthread_cancel test (submitted as a standalone patch)

*** Changes in v6 ***
Correct QEMU_GENERATE implementations for fLSBNEW0/fLSBNEW1
Change Python file handling to use with statement
Change import hex_common to be explicit
Generator cleanup
    Change N?N (new value) to value instead of register number for consistency
    Fixed bud in reading control register pair
    Add ctx_log_reg_write_pair
    Clean up control reg offset from HEX_REG_SA0
Fix errors in FP instructions uncovered by musl libc-tests
    Added unit tests

*** Changes in v5 ***
Bug fixes
    Properly implement circular addressing
        memw(r1++I:circ(m0)) = r2
    Make gen_cmpnd_cmp_jmp execute in 2 parts

Address remaining blocker items from Richard Henderson's review.
    Use qemu softfloat
    Use const where appropriate
    Break tcg_funcs_generated.h into two files - functions and table
    Change struct and enum type names to CamelCase
    Include packet in raw bytes in assembly
    Use DEF_HELPER_FLAGS where possible
    Fix merge_bytes endianness and overlap test by doing the store before load
    Use bitmask instead of string in decoding
    Add comments to decoder
    Use qemu/int128.h
    Use qemu/bitops.h for instruction attributes
    Add bitmask for ctx->reg_log
        Note we still have the array/idx for iteration during gen_commit_packet
    Change opcode_syntax to be created at compile time in gen_dectree_import.c
    Remove unused tmp variables
    Isolate hex_arch_types to imported files
    Fix git am whitespace warnings

Address items from Philippe Mathieu-Daud�'s review
    Split utility functions patch into 3 digestable patches
    Fixed type "definition"
    Change all exit codes to be either 0 or 1
    Validated build with gcc 4.8, 5.5, and *****
    Removed qemu/osdep.h and qemu/host-utils.h from macros.h

Address items from Laurent Vivier's review
    Don't filter out __NR_syscalls
    Remove syscall_nr_generators from linux-user/hexagon/meson.build
    Remove subdir('hexagon') from linux-user/meson.build
    Generate syscall_nr.h from 5.5 Linux kernel
    

*** Changes in v4 ***
Convert target/hexagon/Makefile.objs to meson.build

Address portions of feedback from Richard Henderson.  Here is the table
of items from Richard's review.
Patch   Item                                                 Blocker Status
        Use qemu softfloat                                   Yes
        Use qemu decodetree.py                               No
Several Use const when appropriate                           Yes
Several Remove anything after g_assert_not_reached           Yes     DONE
Several Fix log_store32/64 add/remove/add in patch series    Yes     DONE
Several Follow naming guidelines for structs and enums       Yes
4       Move decls to cpu-param.h                            Yes     DONE
4       Remove CONFIG_USER_ONLY ifdef's                      Yes     DONE
4       Remove DEBUG_HEXAGON                                 Yes     Partially
4       Remove stack pointer modification hack               Yes     DONE
4       Add property x-lldb-compat to control output         Yes     DONE
6       Include instruction and raw bytes in disassembly     Yes
7       Use DEF_HELPER_FLAGS                                 No
07, 26  Endianness of merge_bytes                            Yes
7       Fix overlap test                                     Yes
7       Remove HELPER(debug_value)/HELPER(debug_value_i64)   Yes     DONE
9       Include "qemu/osdep.h" instead of <stdint.h>         Yes     DONE
Several Stick with stdint.h types except in imported files   Yes     DONE
11      Remove description from reg field definitions        Yes     DONE
13      Move regmap.h into decode.c                          Yes     DONE
14, 27  Use bit mask instead of strings in decoding          No
14      Add comments to decoder                              Yes
16      Use qemu/int128.h                                    No
17      Squash patches dealing with imported files           Yes     DONE
24      Use qemu/bitops.h for instruction attributes         No
24      Fix initialization of opcode_short_semantics         Yes     DONE
24      Change if (p == NULL) { g_assert_not_reached(); }
        to assert(p != NULL)                                 No      DONE
25      Expand DECL/READ/WRITE/FREE macros in generator      Yes     DONE
26      Rewrite fINSERT*, fEXTRACT*, f?XTN macros            Yes     DONE
26      Investigate fRND macro                               No      DONE
26      Change REG = REG to (VOID)REG to suppress warning    Yes     DONE
27      Remove multiple includes of imported/iclass.def      Yes     DONE
28      Move genptr_helpers.h into genptr.c                  Yes     DONE
28      Remove unneeded temps                                No      DONE
28      Use tcg_gen_deposit_tl and tcg_gen_extract_tl
        when dealing with p3_0                               No      DONE
29      Size opcode_genptr[] properly and initialize
        with [TAG] = generate_##TAG                          Yes     DONE
30      Don't generate helpers for overridden instructions   Yes     DONE
        Don't include "gen_tcg.h" in helper.h                Yes     DONE
31      Use bitmask for ctx->reg_log instead of an array     Yes
31      Use tcg_gen_extract_i32 for gen_slot_cancelled_check Yes     DONE
31      Properly deal with reading instructions across
        a page boundary and too many instructions before
        finding end-of-packet                                Yes     DONE
31      Don't set PC at the beginning of every packet        No
31      Don't set slot_cancelled unless needed               No
31      Don't set hex_pred_written unless needed             No
31      Change cancelled variable to not local               Yes     DONE
31      Remove unnecessary temp                              Yes     DONE
31      Let tcg_gen_addi_tl check for zero                   Yes     DONE
31      Move gen_exec_counters to end of TB                  No
31      Move end of TB handling to hexagon_tr_tb_stop        Yes     DONE
        Generate two lists for TCG functions instead of
        the DEF_TCG_FUNC macro                               Yes     DONE


*** Changes in v3 ***
Remove substantial portions of the code to facilitate review
- Plan to submit subsequent patches
- Hexagon Vector eXtensions (HVX)
- Circular and bit-reverse addressiong
- Add/sub-with-carry
- Unused insn_t and pkt_t fields
- Unused instruction attributes
- All TCG overrides except instructions with multiple definitions
- Unused macros
- Unused reg fields
- COUNT_HEX_HELPERS
Use Laurent's gensyscall.sh script to generate linux-user/hexagon/syscall_nr.h
Handle mem_noshuf
Remove "RsV = RsV" per review feedback
Simplify include file structure
Add directed tests in <qemu>/tests/tcg/hexagon
Change fWRAP_* macros to fGEN_TCG_*

*** Changes in v2 ***
- Use scripts/git.orderfile
- Create a README with the code overview in patch 0001
- Change #define's in hex_regs.h to an enum
- Replace hard coded disassembly buffer length (1028) with #define
- Move Hexagon architecture types patch earlier in series
- Replace #include standard header files with #include "qemu/osdep.h"
- Prefix all header file #ifndef's with HEXAGON_
- Update python version to python3
- #include "tcg/tcg.h" in genptr_helpers.h
- Change target/hexagon/Makefile.objs to support out-of-tree build
- Updated copyright to include year 2020
- Bug fixes
    Fix some problems with HEX_DEBUG output
    Fix bug in circular addressing
- Optimizations to reduce the amount of TCG code generated
    Change pred_written from an array to a bit mask



Alessandro Di Federico (1):
  Add Dockerfile for hexagon

Taylor Simpson (34):
  Hexagon Update MAINTAINERS file
  Hexagon (target/hexagon) README
  Hexagon (include/elf.h) ELF machine definition
  Hexagon (target/hexagon) scalar core definition
  Hexagon (disas) disassembler
  Hexagon (target/hexagon) register names
  Hexagon (target/hexagon) scalar core helpers
  Hexagon (target/hexagon) GDB Stub
  Hexagon (target/hexagon) architecture types
  Hexagon (target/hexagon) instruction and packet types
  Hexagon (target/hexagon) register fields
  Hexagon (target/hexagon) instruction attributes
  Hexagon (target/hexagon) instruction/packet decode
  Hexagon (target/hexagon) instruction printing
  Hexagon (target/hexagon/arch.[ch]) utility functions
  Hexagon (target/hexagon/conv_emu.[ch]) utility functions
  Hexagon (target/hexagon/fma_emu.[ch]) utility functions
  Hexagon (target/hexagon/imported) arch import
  Hexagon (target/hexagon) generator phase 1 - C preprocessor for
    semantics
  Hexagon (target/hexagon) generator phase 2 - generate header files
  Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode
    tree
  Hexagon (target/hexagon) generater phase 4 - decode tree
  Hexagon (target/hexagon) opcode data structures
  Hexagon (target/hexagon) macros
  Hexagon (target/hexagon) instruction classes
  Hexagon (target/hexagon) TCG generation
  Hexagon (target/hexagon) TCG for instructions with multiple
    definitions
  Hexagon (target/hexagon) TCG for floating point instructions
  Hexagon (target/hexagon) translation
  Hexagon (linux-user/hexagon) Linux user emulation
  Hexagon (tests/tcg/hexagon) TCG tests - multiarch
  Hexagon (tests/tcg/hexagon) TCG tests - atomics/load/store/misc
  Hexagon (tests/tcg/hexagon) TCG tests - floating point
  Hexagon build infrastructure

 default-configs/targets/hexagon-linux-user.mak     |    1 +
 meson.build                                        |    1 +
 include/disas/dis-asm.h                            |    1 +
 include/elf.h                                      |    1 +
 linux-user/hexagon/sockbits.h                      |   18 +
 linux-user/hexagon/syscall_nr.h                    |  322 +++
 linux-user/hexagon/target_cpu.h                    |   44 +
 linux-user/hexagon/target_elf.h                    |   40 +
 linux-user/hexagon/target_fcntl.h                  |   18 +
 linux-user/hexagon/target_signal.h                 |   34 +
 linux-user/hexagon/target_structs.h                |   54 +
 linux-user/hexagon/target_syscall.h                |   36 +
 linux-user/hexagon/termbits.h                      |   18 +
 linux-user/qemu.h                                  |    2 +
 linux-user/syscall_defs.h                          |   33 +
 target/hexagon/arch.h                              |   34 +
 target/hexagon/attribs.h                           |   35 +
 target/hexagon/conv_emu.h                          |   31 +
 target/hexagon/cpu-param.h                         |   29 +
 target/hexagon/cpu.h                               |  159 ++
 target/hexagon/cpu_bits.h                          |   58 +
 target/hexagon/decode.h                            |   32 +
 target/hexagon/fma_emu.h                           |   36 +
 target/hexagon/gen_tcg.h                           |  319 +++
 target/hexagon/genptr.h                            |   25 +
 target/hexagon/helper.h                            |   88 +
 target/hexagon/hex_arch_types.h                    |   38 +
 target/hexagon/hex_regs.h                          |   83 +
 target/hexagon/iclass.h                            |   50 +
 target/hexagon/insn.h                              |   74 +
 target/hexagon/internal.h                          |   37 +
 target/hexagon/macros.h                            |  592 ++++++
 target/hexagon/opcodes.h                           |   58 +
 target/hexagon/printinsn.h                         |   27 +
 target/hexagon/reg_fields.h                        |   36 +
 target/hexagon/translate.h                         |   93 +
 target/hexagon/attribs_def.h.inc                   |   97 +
 target/hexagon/reg_fields_def.h.inc                |   41 +
 disas/hexagon.c                                    |   65 +
 linux-user/elfload.c                               |   16 +
 linux-user/hexagon/cpu_loop.c                      |  100 +
 linux-user/hexagon/signal.c                        |  276 +++
 target/hexagon/arch.c                              |  300 +++
 target/hexagon/conv_emu.c                          |  177 ++
 target/hexagon/cpu.c                               |  318 +++
 target/hexagon/decode.c                            |  957 +++++++++
 target/hexagon/fma_emu.c                           |  702 +++++++
 target/hexagon/gdbstub.c                           |   47 +
 target/hexagon/gen_dectree_import.c                |  188 ++
 target/hexagon/gen_semantics.c                     |   88 +
 target/hexagon/genptr.c                            |  331 +++
 target/hexagon/iclass.c                            |   73 +
 target/hexagon/op_helper.c                         | 1064 ++++++++++
 target/hexagon/opcodes.c                           |  142 ++
 target/hexagon/printinsn.c                         |  146 ++
 target/hexagon/reg_fields.c                        |   27 +
 target/hexagon/translate.c                         |  748 +++++++
 tests/tcg/hexagon/atomics.c                        |  139 ++
 tests/tcg/hexagon/dual_stores.c                    |   60 +
 tests/tcg/hexagon/fpstuff.c                        |  370 ++++
 tests/tcg/hexagon/mem_noshuf.c                     |  328 +++
 tests/tcg/hexagon/misc.c                           |  380 ++++
 tests/tcg/hexagon/preg_alias.c                     |  169 ++
 MAINTAINERS                                        |    9 +
 disas/meson.build                                  |    1 +
 scripts/gensyscalls.sh                             |    1 +
 scripts/qemu-binfmt-conf.sh                        |    6 +-
 target/hexagon/README                              |  235 +++
 target/hexagon/dectree.py                          |  351 ++++
 target/hexagon/gen_helper_funcs.py                 |  220 ++
 target/hexagon/gen_helper_protos.py                |  150 ++
 target/hexagon/gen_op_attribs.py                   |   39 +
 target/hexagon/gen_op_regs.py                      |  110 +
 target/hexagon/gen_opcodes_def.py                  |   36 +
 target/hexagon/gen_printinsn.py                    |  173 ++
 target/hexagon/gen_shortcode.py                    |   60 +
 target/hexagon/gen_tcg_func_table.py               |   58 +
 target/hexagon/gen_tcg_funcs.py                    |  485 +++++
 target/hexagon/hex_common.py                       |  234 +++
 target/hexagon/imported/allidefs.def               |   30 +
 target/hexagon/imported/alu.idef                   | 1258 ++++++++++++
 target/hexagon/imported/branch.idef                |  326 +++
 target/hexagon/imported/compare.idef               |  619 ++++++
 target/hexagon/imported/encode.def                 |  124 ++
 target/hexagon/imported/encode_pp.def              | 2110 ++++++++++++++++++++
 target/hexagon/imported/encode_subinsn.def         |  149 ++
 target/hexagon/imported/float.idef                 |  312 +++
 target/hexagon/imported/iclass.def                 |   51 +
 target/hexagon/imported/ldst.idef                  |  286 +++
 target/hexagon/imported/macros.def                 | 1531 ++++++++++++++
 target/hexagon/imported/mpy.idef                   | 1208 +++++++++++
 target/hexagon/imported/shift.idef                 | 1066 ++++++++++
 target/hexagon/imported/subinsns.idef              |  149 ++
 target/hexagon/imported/system.idef                |   68 +
 target/hexagon/meson.build                         |  193 ++
 target/meson.build                                 |    1 +
 .../debian-hexagon-cross-build-local.docker        |   18 +
 .../debian-hexagon-cross.build-toolchain.sh        |  141 ++
 .../docker/dockerfiles/debian-hexagon-cross.docker |    1 +
 tests/tcg/configure.sh                             |    8 +-
 tests/tcg/hexagon/Makefile.target                  |   46 +
 tests/tcg/hexagon/first.S                          |   56 +
 tests/tcg/hexagon/float_convs.ref                  |  748 +++++++
 tests/tcg/hexagon/float_madds.ref                  |  768 +++++++
 104 files changed, 23339 insertions(+), 2 deletions(-)
 create mode 100644 default-configs/targets/hexagon-linux-user.mak
 create mode 100644 linux-user/hexagon/sockbits.h
 create mode 100644 linux-user/hexagon/syscall_nr.h
 create mode 100644 linux-user/hexagon/target_cpu.h
 create mode 100644 linux-user/hexagon/target_elf.h
 create mode 100644 linux-user/hexagon/target_fcntl.h
 create mode 100644 linux-user/hexagon/target_signal.h
 create mode 100644 linux-user/hexagon/target_structs.h
 create mode 100644 linux-user/hexagon/target_syscall.h
 create mode 100644 linux-user/hexagon/termbits.h
 create mode 100644 target/hexagon/arch.h
 create mode 100644 target/hexagon/attribs.h
 create mode 100644 target/hexagon/conv_emu.h
 create mode 100644 target/hexagon/cpu-param.h
 create mode 100644 target/hexagon/cpu.h
 create mode 100644 target/hexagon/cpu_bits.h
 create mode 100644 target/hexagon/decode.h
 create mode 100644 target/hexagon/fma_emu.h
 create mode 100644 target/hexagon/gen_tcg.h
 create mode 100644 target/hexagon/genptr.h
 create mode 100644 target/hexagon/helper.h
 create mode 100644 target/hexagon/hex_arch_types.h
 create mode 100644 target/hexagon/hex_regs.h
 create mode 100644 target/hexagon/iclass.h
 create mode 100644 target/hexagon/insn.h
 create mode 100644 target/hexagon/internal.h
 create mode 100644 target/hexagon/macros.h
 create mode 100644 target/hexagon/opcodes.h
 create mode 100644 target/hexagon/printinsn.h
 create mode 100644 target/hexagon/reg_fields.h
 create mode 100644 target/hexagon/translate.h
 create mode 100644 target/hexagon/attribs_def.h.inc
 create mode 100644 target/hexagon/reg_fields_def.h.inc
 create mode 100644 disas/hexagon.c
 create mode 100644 linux-user/hexagon/cpu_loop.c
 create mode 100644 linux-user/hexagon/signal.c
 create mode 100644 target/hexagon/arch.c
 create mode 100644 target/hexagon/conv_emu.c
 create mode 100644 target/hexagon/cpu.c
 create mode 100644 target/hexagon/decode.c
 create mode 100644 target/hexagon/fma_emu.c
 create mode 100644 target/hexagon/gdbstub.c
 create mode 100644 target/hexagon/gen_dectree_import.c
 create mode 100644 target/hexagon/gen_semantics.c
 create mode 100644 target/hexagon/genptr.c
 create mode 100644 target/hexagon/iclass.c
 create mode 100644 target/hexagon/op_helper.c
 create mode 100644 target/hexagon/opcodes.c
 create mode 100644 target/hexagon/printinsn.c
 create mode 100644 target/hexagon/reg_fields.c
 create mode 100644 target/hexagon/translate.c
 create mode 100644 tests/tcg/hexagon/atomics.c
 create mode 100644 tests/tcg/hexagon/dual_stores.c
 create mode 100644 tests/tcg/hexagon/fpstuff.c
 create mode 100644 tests/tcg/hexagon/mem_noshuf.c
 create mode 100644 tests/tcg/hexagon/misc.c
 create mode 100644 tests/tcg/hexagon/preg_alias.c
 create mode 100644 target/hexagon/README
 create mode 100755 target/hexagon/dectree.py
 create mode 100755 target/hexagon/gen_helper_funcs.py
 create mode 100755 target/hexagon/gen_helper_protos.py
 create mode 100755 target/hexagon/gen_op_attribs.py
 create mode 100755 target/hexagon/gen_op_regs.py
 create mode 100755 target/hexagon/gen_opcodes_def.py
 create mode 100755 target/hexagon/gen_printinsn.py
 create mode 100755 target/hexagon/gen_shortcode.py
 create mode 100755 target/hexagon/gen_tcg_func_table.py
 create mode 100755 target/hexagon/gen_tcg_funcs.py
 create mode 100755 target/hexagon/hex_common.py
 create mode 100644 target/hexagon/imported/allidefs.def
 create mode 100644 target/hexagon/imported/alu.idef
 create mode 100644 target/hexagon/imported/branch.idef
 create mode 100644 target/hexagon/imported/compare.idef
 create mode 100644 target/hexagon/imported/encode.def
 create mode 100644 target/hexagon/imported/encode_pp.def
 create mode 100644 target/hexagon/imported/encode_subinsn.def
 create mode 100644 target/hexagon/imported/float.idef
 create mode 100644 target/hexagon/imported/iclass.def
 create mode 100644 target/hexagon/imported/ldst.idef
 create mode 100755 target/hexagon/imported/macros.def
 create mode 100644 target/hexagon/imported/mpy.idef
 create mode 100644 target/hexagon/imported/shift.idef
 create mode 100644 target/hexagon/imported/subinsns.idef
 create mode 100644 target/hexagon/imported/system.idef
 create mode 100644 target/hexagon/meson.build
 create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross-build-local.docker
 create mode 100755 tests/docker/dockerfiles/debian-hexagon-cross.build-toolchain.sh
 create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross.docker
 create mode 100644 tests/tcg/hexagon/Makefile.target
 create mode 100644 tests/tcg/hexagon/first.S
 create mode 100644 tests/tcg/hexagon/float_convs.ref
 create mode 100644 tests/tcg/hexagon/float_madds.ref

-- 
2.7.4

Re: [PATCH v8 00/35] Hexagon patch series
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/1612763186-18161-1-git-send-email-tsimpson@quicinc.com/



Hi,

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

Type: series
Message-id: 1612763186-18161-1-git-send-email-tsimpson@quicinc.com
Subject: [PATCH v8 00/35] Hexagon patch series

=== 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/1612763186-18161-1-git-send-email-tsimpson@quicinc.com -> patchew/1612763186-18161-1-git-send-email-tsimpson@quicinc.com
Switched to a new branch 'test'
e71959e Add Dockerfile for hexagon
b7e8432 Hexagon build infrastructure
1fd178a Hexagon (tests/tcg/hexagon) TCG tests - floating point
89d3999 Hexagon (tests/tcg/hexagon) TCG tests - atomics/load/store/misc
a9c3ca4 Hexagon (tests/tcg/hexagon) TCG tests - multiarch
2c9a909 Hexagon (linux-user/hexagon) Linux user emulation
ab1632c Hexagon (target/hexagon) translation
eb45c4f Hexagon (target/hexagon) TCG for floating point instructions
184b3ac Hexagon (target/hexagon) TCG for instructions with multiple definitions
d896de8 Hexagon (target/hexagon) TCG generation
5feb00b Hexagon (target/hexagon) instruction classes
9f9870a Hexagon (target/hexagon) macros
188798c Hexagon (target/hexagon) opcode data structures
ebb5188 Hexagon (target/hexagon) generater phase 4 - decode tree
a4398ec Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree
94f0367 Hexagon (target/hexagon) generator phase 2 - generate header files
a873166 Hexagon (target/hexagon) generator phase 1 - C preprocessor for semantics
4fa249a Hexagon (target/hexagon/imported) arch import
269dad9 Hexagon (target/hexagon/fma_emu.[ch]) utility functions
a705db0 Hexagon (target/hexagon/conv_emu.[ch]) utility functions
d30061a Hexagon (target/hexagon/arch.[ch]) utility functions
1024159 Hexagon (target/hexagon) instruction printing
dd519a9 Hexagon (target/hexagon) instruction/packet decode
3bb8d3d Hexagon (target/hexagon) instruction attributes
3f802d0 Hexagon (target/hexagon) register fields
e6475ae Hexagon (target/hexagon) instruction and packet types
f810506 Hexagon (target/hexagon) architecture types
0da2919 Hexagon (target/hexagon) GDB Stub
6f8acae Hexagon (target/hexagon) scalar core helpers
9266519 Hexagon (target/hexagon) register names
f5f4022 Hexagon (disas) disassembler
a0c1b3d Hexagon (target/hexagon) scalar core definition
a13b56a Hexagon (include/elf.h) ELF machine definition
fdbf072 Hexagon (target/hexagon) README
e088d0c Hexagon Update MAINTAINERS file

=== OUTPUT BEGIN ===
1/35 Checking commit e088d0c1088a (Hexagon Update MAINTAINERS file)
2/35 Checking commit fdbf072e162e (Hexagon (target/hexagon) README)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100644

total: 0 errors, 1 warnings, 235 lines checked

Patch 2/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/35 Checking commit a13b56a21bd4 (Hexagon (include/elf.h) ELF machine definition)
4/35 Checking commit a0c1b3d3d63d (Hexagon (target/hexagon) scalar core definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 599 lines checked

Patch 4/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/35 Checking commit f5f4022b1301 (Hexagon (disas) disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#22: 
new file mode 100644

total: 0 errors, 1 warnings, 79 lines checked

Patch 5/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/35 Checking commit 92665197bcd8 (Hexagon (target/hexagon) register names)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 6/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/35 Checking commit 6f8acae0a07b (Hexagon (target/hexagon) scalar core helpers)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#18: 
new file mode 100644

total: 0 errors, 1 warnings, 1152 lines checked

Patch 7/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/35 Checking commit 0da2919872fa (Hexagon (target/hexagon) GDB Stub)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#19: 
new file mode 100644

total: 0 errors, 1 warnings, 55 lines checked

Patch 8/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/35 Checking commit f81050687616 (Hexagon (target/hexagon) architecture types)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100644

total: 0 errors, 1 warnings, 38 lines checked

Patch 9/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/35 Checking commit e6475ae026f9 (Hexagon (target/hexagon) instruction and packet types)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100644

total: 0 errors, 1 warnings, 74 lines checked

Patch 10/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/35 Checking commit 3f802d0701f4 (Hexagon (target/hexagon) register fields)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#18: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#84: FILE: target/hexagon/reg_fields.h:29:
+#define DEF_REG_FIELD(TAG, START, WIDTH) \
+    TAG,

total: 1 errors, 1 warnings, 104 lines checked

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

12/35 Checking commit 3bb8d3d83bc5 (Hexagon (target/hexagon) instruction attributes)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#45: FILE: target/hexagon/attribs.h:25:
+#define DEF_ATTRIB(NAME, ...) A_##NAME,

total: 1 errors, 1 warnings, 132 lines checked

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

13/35 Checking commit dd519a99ef6f (Hexagon (target/hexagon) instruction/packet decode)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#131: FILE: target/hexagon/decode.c:101:
+#define DECODE_SEPARATOR_BITS(START, WIDTH) NULL, START, WIDTH

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#637: FILE: target/hexagon/decode.c:607:
+#define DECODE_OPINFO(TAG, BEH) \
+    case TAG: \
+        { BEH  } \
+        break; \
+

total: 2 errors, 1 warnings, 989 lines checked

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

14/35 Checking commit 102415937a11 (Hexagon (target/hexagon) instruction printing)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100644

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#63: FILE: target/hexagon/printinsn.c:43:
+#define DEF_PRINTINFO(TAG, FMT, ...) \
+    case TAG: \
+        g_string_append_printf(buf, FMT, __VA_ARGS__); \
+        break;

total: 1 errors, 1 warnings, 173 lines checked

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

15/35 Checking commit d30061ac1775 (Hexagon (target/hexagon/arch.[ch]) utility functions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

total: 0 errors, 1 warnings, 334 lines checked

Patch 15/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/35 Checking commit a705db08f1e8 (Hexagon (target/hexagon/conv_emu.[ch]) utility functions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

total: 0 errors, 1 warnings, 208 lines checked

Patch 16/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/35 Checking commit 269dad92975c (Hexagon (target/hexagon/fma_emu.[ch]) utility functions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

ERROR: "foo * bar" should be "foo *bar"
#411: FILE: target/hexagon/fma_emu.c:392:
+static inline SUFFIX accum_round_##SUFFIX(Accum a, float_status * fp_status) \

WARNING: Block comments use a leading /* on a separate line
#415: FILE: target/hexagon/fma_emu.c:396:
+        /* result zero */ \

WARNING: Block comments use a leading /* on a separate line
#423: FILE: target/hexagon/fma_emu.c:404:
+    /* Normalize right */ \

WARNING: Block comments use a leading /* on a separate line
#424: FILE: target/hexagon/fma_emu.c:405:
+    /* We want MANTBITS bits of mantissa plus the leading one. */ \

WARNING: Block comments use a leading /* on a separate line
#425: FILE: target/hexagon/fma_emu.c:406:
+    /* That means that we want MANTBITS+1 bits, or 0x000000000000FF_FFFF */ \

WARNING: Block comments use a leading /* on a separate line
#426: FILE: target/hexagon/fma_emu.c:407:
+    /* So we need to normalize right while the high word is non-zero and \

WARNING: Block comments should align the * on each line
#427: FILE: target/hexagon/fma_emu.c:408:
+    /* So we need to normalize right while the high word is non-zero and \
+    * while the low word is nonzero when masked with 0xffe0_0000_0000_0000 */ \

WARNING: Block comments use a leading /* on a separate line
#432: FILE: target/hexagon/fma_emu.c:413:
+    /* \

WARNING: Block comments use a leading /* on a separate line
#442: FILE: target/hexagon/fma_emu.c:423:
+    /* \

WARNING: Block comments use a leading /* on a separate line
#449: FILE: target/hexagon/fma_emu.c:430:
+        /* \

WARNING: Block comments use a leading /* on a separate line
#458: FILE: target/hexagon/fma_emu.c:439:
+    /* OK, we're relatively canonical... now we need to round */ \

WARNING: Block comments use a leading /* on a separate line
#463: FILE: target/hexagon/fma_emu.c:444:
+            /* Chop and we're done */ \

WARNING: Block comments use a leading /* on a separate line
#477: FILE: target/hexagon/fma_emu.c:458:
+                /* round up if guard is 1, down if guard is zero */ \

WARNING: Block comments use a leading /* on a separate line
#480: FILE: target/hexagon/fma_emu.c:461:
+                /* exactly .5, round up if odd */ \

WARNING: Block comments use a leading /* on a separate line
#486: FILE: target/hexagon/fma_emu.c:467:
+    /* \

WARNING: Block comments use a leading /* on a separate line
#495: FILE: target/hexagon/fma_emu.c:476:
+    /* Overflow? */ \

WARNING: Block comments use a leading /* on a separate line
#497: FILE: target/hexagon/fma_emu.c:478:
+        /* Yep, inf result */ \

WARNING: Block comments use a leading /* on a separate line
#519: FILE: target/hexagon/fma_emu.c:500:
+    /* Underflow? */ \

WARNING: Block comments use a leading /* on a separate line
#521: FILE: target/hexagon/fma_emu.c:502:
+        /* Leading one means: No, we're normal. So, we should be done... */ \

total: 1 errors, 19 warnings, 738 lines checked

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

18/35 Checking commit 4fa249aec3d1 (Hexagon (target/hexagon/imported) arch import)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

total: 0 errors, 1 warnings, 9236 lines checked

Patch 18/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
19/35 Checking commit a8731661ffe1 (Hexagon (target/hexagon) generator phase 1 - C preprocessor for semantics)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#21: 
new file mode 100644

ERROR: suspicious ; after while (0)
#86: FILE: target/hexagon/gen_semantics.c:61:
+    } while (0);

total: 1 errors, 1 warnings, 88 lines checked

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

20/35 Checking commit 94f03677e802 (Hexagon (target/hexagon) generator phase 2 - generate header files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100755

WARNING: line over 80 characters
#995: FILE: target/hexagon/gen_tcg_funcs.py:53:
+        f.write("        tcg_gen_mov_tl(hex_new_value[%s + 1], hex_gpr[%s + 1]);\n" % \

WARNING: line over 80 characters
#1076: FILE: target/hexagon/gen_tcg_funcs.py:134:
+            f.write("    TCGv %s%sN = hex_new_pred_value[insn->regno[%d]];\n" % \

WARNING: line over 80 characters
#1158: FILE: target/hexagon/gen_tcg_funcs.py:216:
+            f.write("                                 hex_gpr[%s%sN + 1]);\n" % \

WARNING: line over 80 characters
#1235: FILE: target/hexagon/gen_tcg_funcs.py:293:
+        f.write("    gen_log_predicated_reg_write_pair(%s%sN, %s%sV, insn->slot);\n" % \

total: 0 errors, 5 warnings, 1565 lines checked

Patch 20/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/35 Checking commit a4398ec594ee (Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#19: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#68: FILE: target/hexagon/gen_dectree_import.c:45:
+#define Q6INSN(TAG, BEH, ATTRIBS, DESCR, SEM) \
+   [TAG] = BEH,

ERROR: Macros with complex values should be enclosed in parenthesis
#70: FILE: target/hexagon/gen_dectree_import.c:47:
+#define EXTINSN(TAG, BEH, ATTRIBS, DESCR, SEM) \
+   [TAG] = BEH,

ERROR: Macros with complex values should be enclosed in parenthesis
#78: FILE: target/hexagon/gen_dectree_import.c:55:
+#define REGINFO(TAG, REGINFO, RREGS, WREGS) RREGS,

ERROR: Macros with complex values should be enclosed in parenthesis
#87: FILE: target/hexagon/gen_dectree_import.c:64:
+#define REGINFO(TAG, REGINFO, RREGS, WREGS) WREGS,

ERROR: suspicious ; after while (0)
#184: FILE: target/hexagon/gen_dectree_import.c:161:
+    } while (0);

total: 5 errors, 1 warnings, 188 lines checked

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

22/35 Checking commit ebb5188d1866 (Hexagon (target/hexagon) generater phase 4 - decode tree)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#16: 
new file mode 100755

total: 0 errors, 1 warnings, 351 lines checked

Patch 22/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
23/35 Checking commit 188798c0543e (Hexagon (target/hexagon) opcode data structures)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#60: FILE: target/hexagon/opcodes.c:41:
+#define REGINFO(TAG, REGINFO, RREGS, WREGS) REGINFO,

ERROR: Macros with complex values should be enclosed in parenthesis
#70: FILE: target/hexagon/opcodes.c:51:
+#define REGINFO(TAG, REGINFO, RREGS, WREGS) RREGS,

ERROR: Macros with complex values should be enclosed in parenthesis
#80: FILE: target/hexagon/opcodes.c:61:
+#define REGINFO(TAG, REGINFO, RREGS, WREGS) WREGS,

ERROR: Macros with complex values should be enclosed in parenthesis
#88: FILE: target/hexagon/opcodes.c:69:
+#define DEF_SHORTCODE(TAG, SHORTCODE)              [TAG] = #SHORTCODE,

ERROR: Macros with complex values should be enclosed in parenthesis
#127: FILE: target/hexagon/opcodes.c:108:
+#define ATTRIBS(...) , ## __VA_ARGS__, 0

total: 5 errors, 1 warnings, 200 lines checked

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

24/35 Checking commit 9f9870a235a6 (Hexagon (target/hexagon) macros)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100644

total: 0 errors, 1 warnings, 592 lines checked

Patch 24/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
25/35 Checking commit 5feb00be6a48 (Hexagon (target/hexagon) instruction classes)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#18: 
new file mode 100644

ERROR: Macros with complex values should be enclosed in parenthesis
#45: FILE: target/hexagon/iclass.c:23:
+#define DEF_PP_ICLASS32(TYPE, SLOTS, UNITS) \
+    [ICLASS_FROM_TYPE(TYPE)] = SLOTS_##SLOTS,

ERROR: Macros with complex values should be enclosed in parenthesis
#47: FILE: target/hexagon/iclass.c:25:
+#define DEF_EE_ICLASS32(TYPE, SLOTS, UNITS) \
+    [ICLASS_FROM_TYPE(TYPE)] = SLOTS_##SLOTS,

ERROR: Macros with complex values should be enclosed in parenthesis
#128: FILE: target/hexagon/iclass.h:27:
+#define DEF_PP_ICLASS32(TYPE, SLOTS, UNITS)    ICLASS_FROM_TYPE(TYPE),

ERROR: Macros with complex values should be enclosed in parenthesis
#129: FILE: target/hexagon/iclass.h:28:
+#define DEF_EE_ICLASS32(TYPE, SLOTS, UNITS)    ICLASS_FROM_TYPE(TYPE),

total: 4 errors, 1 warnings, 174 lines checked

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

26/35 Checking commit d896de82dff6 (Hexagon (target/hexagon) TCG generation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100644

total: 0 errors, 1 warnings, 356 lines checked

Patch 26/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
27/35 Checking commit 184b3ac19881 (Hexagon (target/hexagon) TCG for instructions with multiple definitions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
new file mode 100644

total: 0 errors, 1 warnings, 198 lines checked

Patch 27/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
28/35 Checking commit eb45c4f8ec61 (Hexagon (target/hexagon) TCG for floating point instructions)
29/35 Checking commit ab1632cff2fb (Hexagon (target/hexagon) translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#21: 
new file mode 100644

total: 0 errors, 1 warnings, 841 lines checked

Patch 29/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/35 Checking commit 2c9a909e8e24 (Hexagon (linux-user/hexagon) Linux user emulation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#59: 
new file mode 100644

ERROR: Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead
#139: FILE: linux-user/hexagon/cpu_loop.c:76:
+            EXCP_DUMP(env, "\nqemu: unhandled CPU exception %#x - aborting\n",

total: 1 errors, 1 warnings, 1040 lines checked

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

31/35 Checking commit a9c3ca4cce6f (Hexagon (tests/tcg/hexagon) TCG tests - multiarch)
ERROR: line over 90 characters
#38: FILE: tests/tcg/configure.sh:99:
+    alpha|cris|hexagon|hppa|i386|lm32|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64)

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
new file mode 100644

total: 1 errors, 1 warnings, 1562 lines checked

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

32/35 Checking commit 89d39998fc4d (Hexagon (tests/tcg/hexagon) TCG tests - atomics/load/store/misc)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
new file mode 100644

total: 0 errors, 1 warnings, 1150 lines checked

Patch 32/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/35 Checking commit 1fd178ab9634 (Hexagon (tests/tcg/hexagon) TCG tests - floating point)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

total: 0 errors, 1 warnings, 376 lines checked

Patch 33/35 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/35 Checking commit b7e8432b75a4 (Hexagon build infrastructure)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28: 
new file mode 100644

WARNING: line over 80 characters
#63: FILE: scripts/qemu-binfmt-conf.sh:139:
+hexagon_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xa4\x00'

ERROR: line over 90 characters
#64: FILE: scripts/qemu-binfmt-conf.sh:140:
+hexagon_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'

total: 1 errors, 2 warnings, 226 lines checked

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

35/35 Checking commit e71959ea0fe8 (Add Dockerfile for hexagon)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#18: 
new file mode 100644

WARNING: line over 80 characters
#109: FILE: tests/docker/dockerfiles/debian-hexagon-cross.build-toolchain.sh:63:
+    -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \

ERROR: line over 90 characters
#136: FILE: tests/docker/dockerfiles/debian-hexagon-cross.build-toolchain.sh:90:
+    CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \

ERROR: line over 90 characters
#173: FILE: tests/docker/dockerfiles/debian-hexagon-cross.build-toolchain.sh:127:
+    CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \

total: 2 errors, 2 warnings, 170 lines checked

Patch 35/35 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/1612763186-18161-1-git-send-email-tsimpson@quicinc.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v8 00/35] Hexagon patch series
Posted by Richard Henderson 3 years, 2 months ago
On 2/7/21 9:45 PM, Taylor Simpson wrote:
> This series adds support for the Hexagon processor with Linux user support
> 
> See patch 02 Hexagon README for detailed information.
> 
> This series assumes int128_or() is implemented.
> https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg06004.html
> 
> The series is also available at https://github.com/quic/qemu on branch
> small_series_v8.
> 
> 
> Once the series is applied, the Hexagon port will pass "make check-tcg".
> The series also includes Hexagon-specific tests in tcg/tests/hexagon.
> 
> The final patch in the series add docker support.  Thanks to Alessandro
> Di Federico <ale@rev.ng> and Brian Cain <bcain@quicinc.com> for making this
> happen.  The default container (debian-hexagon-cross) uses a toolchain built
> by rev.ng.  Alternatively, there is a container that will build the toolchain
> locally (debian-hexagon-cross-build-local).

Right.  This is in really good shape.

I've completed review of this round, and there are some nits.  But they're
minor enough that I wouldn't even mind them being addressed via the normal
development process.  I.e. I'd be keen to not look through that diffstat again.
 ;-)

Any objections from anyone else on that?

I don't suppose you and Peter Maydell signed gpg keys when we all met in Lyon?


r~

RE: [PATCH v8 00/35] Hexagon patch series
Posted by Taylor Simpson 3 years, 2 months ago

> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Sunday, February 14, 2021 7:23 PM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: philmd@redhat.com; alex.bennee@linaro.org; laurent@vivier.eu;
> ale@rev.ng; Brian Cain <bcain@quicinc.com>; Peter Maydell
> <peter.maydell@linaro.org>
> Subject: Re: [PATCH v8 00/35] Hexagon patch series
>
> On 2/7/21 9:45 PM, Taylor Simpson wrote:
> > This series adds support for the Hexagon processor with Linux user support
> >
> > See patch 02 Hexagon README for detailed information.
> >
> > This series assumes int128_or() is implemented.
> > https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg06004.html
> >

What's the status of this patch?  Could you go ahead and merge it ahead of the rest of the series that it's in?

> >
> > Once the series is applied, the Hexagon port will pass "make check-tcg".
> > The series also includes Hexagon-specific tests in tcg/tests/hexagon.
> >
> > The final patch in the series add docker support.  Thanks to Alessandro
> > Di Federico <ale@rev.ng> and Brian Cain <bcain@quicinc.com> for making
> this
> > happen.  The default container (debian-hexagon-cross) uses a toolchain
> built
> > by rev.ng.  Alternatively, there is a container that will build the toolchain
> > locally (debian-hexagon-cross-build-local).
>
> Right.  This is in really good shape.
>
> I've completed review of this round, and there are some nits.  But they're
> minor enough that I wouldn't even mind them being addressed via the
> normal
> development process.  I.e. I'd be keen to not look through that diffstat again.
>  ;-)

Thanks Richard!!  We're having unprecedented winter weather in Austin, so I'll address your latest feedback once our datacenter recovers from a power outage.

>
> Any objections from anyone else on that?
>
> I don't suppose you and Peter Maydell signed gpg keys when we all met in
> Lyon?

Nope.  Peter, please advise
Re: [PATCH v8 00/35] Hexagon patch series
Posted by Peter Maydell 3 years, 2 months ago
On Tue, 16 Feb 2021 at 20:59, Taylor Simpson <tsimpson@quicinc.com> wrote:
> > -----Original Message-----
> > From: Richard Henderson <richard.henderson@linaro.org>
> > I've completed review of this round, and there are some nits.  But they're
> > minor enough that I wouldn't even mind them being addressed via the
> > normal
> > development process.  I.e. I'd be keen to not look through that diffstat again.
> >  ;-)

> > Any objections from anyone else on that?
> >
> > I don't suppose you and Peter Maydell signed gpg keys when we all met in
> > Lyon?
>
> Nope.  Peter, please advise

We effectively are operating a TOFU policy for gpg keys,
ie put them on a public keyserver, to the extent that you can arrange
to get them signed by other people who also have gpg keys please do,
and at some point we may be able to meet up and get a shorter
trust path.

For this patchset, I would prefer it if Richard collected the patches
and sent me a pullrequest. First pullrequests from new submaintainers
are higher-effort for me, because I need to look them through carefully
to be sure that they're the right format and so on; so I'd rather
not do that with an enormous patchset. It's easier for me if that
work is postponed and done with something smaller later.

thanks
-- PMM

Re: [PATCH v8 00/35] Hexagon patch series
Posted by Philippe Mathieu-Daudé 3 years, 2 months ago
On 2/16/21 10:17 PM, Peter Maydell wrote:
> On Tue, 16 Feb 2021 at 20:59, Taylor Simpson <tsimpson@quicinc.com> wrote:
>>> -----Original Message-----
>>> From: Richard Henderson <richard.henderson@linaro.org>
>>> I've completed review of this round, and there are some nits.  But they're
>>> minor enough that I wouldn't even mind them being addressed via the
>>> normal
>>> development process.  I.e. I'd be keen to not look through that diffstat again.
>>>  ;-)
> 
>>> Any objections from anyone else on that?

I'm very pleased with how this series evolved over the time,
and Taylor interaction with the community during the long
review process.

Patches 1-34 are OK but I don't think patch 35 (Dockerfile hexagon)
should enter mainstream that way. It probably makes sense to add
it along with the CI testing job (missing so far).

Patch 30 (Linux user emulation) could have an Acked-by from Laurent.

Also, while having TCG unit tests is great, it doesn't replace
integration tests using real world binaries. So personally I'd
like to be able to test an Hexagon BusyBox, ideally one coming
from the official Hexagon distribution (extracted from the SDK).
We talked about this and Brian will probably share it.

Whole series tested it on x86, so:
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
(I still plan to test it on big-endian host)

>>> I don't suppose you and Peter Maydell signed gpg keys when we all met in
>>> Lyon?
>>
>> Nope.  Peter, please advise
> 
> We effectively are operating a TOFU policy for gpg keys,
> ie put them on a public keyserver, to the extent that you can arrange
> to get them signed by other people who also have gpg keys please do,
> and at some point we may be able to meet up and get a shorter
> trust path.
> 
> For this patchset, I would prefer it if Richard collected the patches
> and sent me a pullrequest. First pullrequests from new submaintainers
> are higher-effort for me, because I need to look them through carefully
> to be sure that they're the right format and so on; so I'd rather
> not do that with an enormous patchset. It's easier for me if that
> work is postponed and done with something smaller later.

Ahah I just suggested to Taylor to look at your previous explanation
before reading the same explanation here :)
https://www.mail-archive.com/qemu-devel@nongnu.org/msg765788.html

Regards,

Phil.

Re: [PATCH v8 00/35] Hexagon patch series
Posted by Richard Henderson 3 years, 2 months ago
On 2/17/21 6:23 AM, Philippe Mathieu-Daudé wrote:
> I'm very pleased with how this series evolved over the time,
> and Taylor interaction with the community during the long
> review process.
> 
> Patches 1-34 are OK but I don't think patch 35 (Dockerfile hexagon)
> should enter mainstream that way. It probably makes sense to add
> it along with the CI testing job (missing so far).

Ok, I'll drop 35 from the initial pull,

> Patch 30 (Linux user emulation) could have an Acked-by from Laurent.

and wait a couple of days more for this.  But without, I'll send the PR on the
weekend.

> Whole series tested it on x86, so:
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> (I still plan to test it on big-endian host)

Thanks.


r~

Re: [PATCH v8 00/35] Hexagon patch series
Posted by Richard Henderson 3 years, 2 months ago
On 2/16/21 12:59 PM, Taylor Simpson wrote:
>>> This series assumes int128_or() is implemented.
>>> https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg06004.html
>>>
> 
> What's the status of this patch?  Could you go ahead and merge it ahead of the rest of the series that it's in?

The fp patch set that created this patch has been rewritten and no longer uses
it.  I'll queue this to the branch that will include this pull.


r~