Skip to content

Hexagon HVX (target/hexagon) patch series

Taylor Simpson qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest30 patches 2 repliesIn review
  2. v430 patches 14 repliesSuperseded
  3. v330 patches 20 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v230 patches0 repliesSuperseded
v120 patches19 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/30Hexagon HVX (target/hexagon) READMEtarget/hexagon/README+80 -11 reply
2/30Hexagon HVX (target/hexagon) add Hexagon Vector eXtensions (HVX) to coretarget/hexagon/cpu.c target/hexagon/cpu.h target/hexagon/hex_arch_types.h +3 more+200 -60 replies
3/30Hexagon HVX (target/hexagon) register namestarget/hexagon/cpu.c target/hexagon/hex_regs.h+2 -10 replies
4/30Hexagon HVX (target/hexagon) instruction attributestarget/hexagon/attribs_def.h.inc+22 -00 replies
5/30Hexagon HVX (target/hexagon) macrostarget/hexagon/macros.h target/hexagon/mmvec/macros.h+376 -00 replies
6/30Hexagon HVX (target/hexagon) import macro definitionstarget/hexagon/imported/allext_macros.def target/hexagon/imported/macros.def target/hexagon/imported/mmvec/macros.def+955 -00 replies
7/30Hexagon HVX (target/hexagon) semantics generatortarget/hexagon/gen_semantics.c target/hexagon/hex_common.py+46 -00 replies
8/30Hexagon HVX (target/hexagon) semantics generator - part 2target/hexagon/gen_helper_funcs.py target/hexagon/gen_helper_protos.py target/hexagon/gen_tcg_funcs.py+360 -220 replies
9/30Hexagon HVX (target/hexagon) C preprocessor for decode treetarget/hexagon/gen_dectree_import.c+13 -00 replies
10/30Hexagon HVX (target/hexagon) instruction utility functionstarget/hexagon/meson.build target/hexagon/mmvec/system_ext_mmvec.c target/hexagon/mmvec/system_ext_mmvec.h+73 -01 reply
11/30Hexagon HVX (target/hexagon) helper functionstarget/hexagon/helper.h target/hexagon/op_helper.c+296 -20 replies
12/30Hexagon HVX (target/hexagon) TCG generationtarget/hexagon/genptr.c target/hexagon/translate.c target/hexagon/translate.h+311 -40 replies
13/30Hexagon HVX (target/hexagon) helper overrides infrastructuretarget/hexagon/gen_helper_funcs.py target/hexagon/gen_helper_protos.py target/hexagon/gen_tcg_funcs.py +3 more+35 -90 replies
14/30Hexagon HVX (target/hexagon) helper overrides for histogram instructionstarget/hexagon/gen_tcg_hvx.h+106 -00 replies
15/30Hexagon HVX (target/hexagon) helper overrides - vector assign & cmovtarget/hexagon/gen_tcg_hvx.h+31 -00 replies
16/30Hexagon HVX (target/hexagon) helper overrides - vector add & subtarget/hexagon/gen_tcg_hvx.h+50 -00 replies
17/30Hexagon HVX (target/hexagon) helper overrides - vector shiftstarget/hexagon/gen_tcg_hvx.h+122 -00 replies
18/30Hexagon HVX (target/hexagon) helper overrides - vector max/mintarget/hexagon/gen_tcg_hvx.h+34 -00 replies
19/30Hexagon HVX (target/hexagon) helper overrides - vector logical opstarget/hexagon/gen_tcg_hvx.h+42 -00 replies
20/30Hexagon HVX (target/hexagon) helper overrides - vector comparestarget/hexagon/gen_tcg_hvx.h+103 -00 replies
21/30Hexagon HVX (target/hexagon) helper overrides - vector splat and abstarget/hexagon/gen_tcg_hvx.h+26 -00 replies
22/30Hexagon HVX (target/hexagon) helper overrides - vector loadstarget/hexagon/gen_tcg_hvx.h+150 -00 replies
23/30Hexagon HVX (target/hexagon) helper overrides - vector storestarget/hexagon/gen_tcg_hvx.h+218 -00 replies
24/30Hexagon HVX (target/hexagon) import semanticstarget/hexagon/genptr.c target/hexagon/imported/allext.idef target/hexagon/imported/allidefs.def +1 more+2804 -00 replies
25/30Hexagon HVX (target/hexagon) instruction decodingtarget/hexagon/decode.c target/hexagon/meson.build target/hexagon/mmvec/decode_ext_mmvec.c +1 more+283 -20 replies
26/30Hexagon HVX (target/hexagon) import instruction encodingstarget/hexagon/decode.c target/hexagon/imported/allextenc.def target/hexagon/imported/encode.def +1 more+819 -00 replies
27/30Hexagon HVX (tests/tcg/hexagon) vector_add_int testtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/vector_add_int.c+64 -00 replies
28/30Hexagon HVX (tests/tcg/hexagon) hvx_misc testtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/hvx_misc.c+471 -00 replies
29/30Hexagon HVX (tests/tcg/hexagon) scatter_gather testtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/scatter_gather.c+1013 -00 replies
30/30Hexagon HVX (tests/tcg/hexagon) histogram testtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/hvx_histogram.c tests/tcg/hexagon/hvx_histogram_input.h +2 more+1128 -00 replies

Reviews trailers per patch

All 30 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-Daudé
1/30R-b
2/30A-b
3/30R-b
4/30A-b
5/30A-b
6/30A-b
7/30A-b
8/30A-b
9/30A-b
10/30R-b
11/30R-b
12/30R-b
13/30R-b R-b
14/30R-b
15/30R-b
16/30R-b
17/30R-b
18/30R-b
19/30R-b
20/30R-b
21/30R-b
22/30A-b
23/30A-b
24/30A-b
25/30A-b
26/30A-b
27/30R-b
28/30A-b
29/30A-b
30/30A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/30] Hexagon HVX (target/hexagon) patch series

This series adds support for the Hexagon Vector eXtensions (HVX)

These instructions are documented here
https://developer.qualcomm.com/downloads/qualcomm-hexagon-v66-hvx-programmer-s-reference-manual

Hexagon HVX is a wide vector engine with 128 byte vectors.

See patch 01 Hexagon HVX README for more information.

*** Known checkpatch issues ***

The following are known checkpatch errors in the series
target/hexagon/gen_semantics.c Suspicious ; after while (0)
tests/tcg/hexagon/hvx_misc.c Spaces around operator in macro invocation

*** Changes in v5 ***
Address feedback from Richard Henderson <[email protected]>
- Remove unneeded initialization in system_ext_mmvec.c
- Remove vtcm_log.size, replace uses with sizeof(MMVector) Fix bitmap sizes
Change cmp in gen_commit_hvx from tcg_temp_local_new to tcg_temp_new

*** Changes in v4 ***
Address feedback from Richard Henderson <[email protected]>
- Use tcg_gen_gvec_orc/tcg_gen_gvec_andc
Add tests for the following opcodes

    V6_pred_or
    V6_pred_or_n
    V6_pred_and
    V6_pred_and_n
    V6_pred_xor

Probe the HVX stores at the beginning of gen_commit_packet
See patches 11 (helper functions) and 12 (TCG generation)
Use tcg_constant_* instead of tcg_const_*

*** Changes in v3 ***
Clean up gen_log_vreg_write
- Remove has_vhist parameter
Remove VRegs_updated_tmp from runtime state
- Check there is exactly one tmp for vhist at TCG generation time Remove VRegs_select from runtime state
Add test_max_temps test to tests/tcg/hexagon/hvx_misc.c Don't pass slot to HVX helpers

*** Changes in v2 ***
Address feedback from Richard Henderson <[email protected]>
- Remove zero_vector from CPUHexagonState
- Remove gather_issued from CPUHexagonState
- Remove is_gather_store_insn from DisasContext and CPUHexagonState
- Change VStoreLog.mask to a bitmap
- Change VTCMStoreLog.mask to a bitmap
- Convert future_VRegs, tmp_Vregs to allocate as-needed
- Don't cast away const
- Remove/simplify count_leading_ones_2
- Control HVX dump with CPU_DUMP_FPU
Remove HVX support from target/hexagon/gdbstub.c
- Hexagon uses lldb which will require support for qRegisterInfo in the target-independent gdbstub. Will contribute this separately
Convert the histogram instructions to execute at the end of packet commit
- This is necessary to allocate future_VRegs as-needed Additional tests added in tests/tcg/hexagon
Added helper overrides for several instructions
- As a result, cleaned up utility functions Additional_cleanup
- Change TCGv_ptr to not _local_
- Remove env argument from gen_commit_hvx

Taylor Simpson (30):
Hexagon HVX (target/hexagon) README
Hexagon HVX (target/hexagon) add Hexagon Vector eXtensions (HVX) to
core
Hexagon HVX (target/hexagon) register names
Hexagon HVX (target/hexagon) instruction attributes Hexagon HVX (target/hexagon) macros
Hexagon HVX (target/hexagon) import macro definitions Hexagon HVX (target/hexagon) semantics generator
Hexagon HVX (target/hexagon) semantics generator - part 2 Hexagon HVX (target/hexagon) C preprocessor for decode tree Hexagon HVX (target/hexagon) instruction utility functions Hexagon HVX (target/hexagon) helper functions
Hexagon HVX (target/hexagon) TCG generation
Hexagon HVX (target/hexagon) helper overrides infrastructure Hexagon HVX (target/hexagon) helper overrides for histogram
instructions
Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov Hexagon HVX (target/hexagon) helper overrides - vector add & sub Hexagon HVX (target/hexagon) helper overrides - vector shifts Hexagon HVX (target/hexagon) helper overrides - vector max/min Hexagon HVX (target/hexagon) helper overrides - vector logical ops Hexagon HVX (target/hexagon) helper overrides - vector compares Hexagon HVX (target/hexagon) helper overrides - vector splat and abs Hexagon HVX (target/hexagon) helper overrides - vector loads Hexagon HVX (target/hexagon) helper overrides - vector stores Hexagon HVX (target/hexagon) import semantics
Hexagon HVX (target/hexagon) instruction decoding
Hexagon HVX (target/hexagon) import instruction encodings Hexagon HVX (tests/tcg/hexagon) vector_add_int test Hexagon HVX (tests/tcg/hexagon) hvx_misc test
Hexagon HVX (tests/tcg/hexagon) scatter_gather test Hexagon HVX (tests/tcg/hexagon) histogram test

 target/hexagon/cpu.h                         |   35 +-
 target/hexagon/gen_tcg_hvx.h                 |  903 +++++++++
 target/hexagon/helper.h                      |   16 +
 target/hexagon/hex_arch_types.h              |    5 +
 target/hexagon/hex_regs.h                    |    1 +
 target/hexagon/insn.h                        |    3 +
 target/hexagon/internal.h                    |    3 +
 target/hexagon/macros.h                      |   22 +
 target/hexagon/mmvec/decode_ext_mmvec.h      |   24 +
 target/hexagon/mmvec/macros.h                |  354 ++++
 target/hexagon/mmvec/mmvec.h                 |   82 +
 target/hexagon/mmvec/system_ext_mmvec.h      |   25 +
 target/hexagon/translate.h                   |   61 +
 tests/tcg/hexagon/hvx_histogram_input.h      |  717 +++++++
 tests/tcg/hexagon/hvx_histogram_row.h        |   24 +
 target/hexagon/attribs_def.h.inc             |   22 +
 target/hexagon/cpu.c                         |   80 +-
 target/hexagon/decode.c                      |   28 +-
 target/hexagon/gen_dectree_import.c          |   13 +
 target/hexagon/gen_semantics.c               |   33 +
 target/hexagon/genptr.c                      |  188 ++
 target/hexagon/mmvec/decode_ext_mmvec.c      |  236 +++
 target/hexagon/mmvec/system_ext_mmvec.c      |   47 +
 target/hexagon/op_helper.c                   |  282 ++-
 target/hexagon/translate.c                   |  239 ++-
 tests/tcg/hexagon/hvx_histogram.c            |   88 +
 tests/tcg/hexagon/hvx_misc.c                 |  469 +++++
 tests/tcg/hexagon/scatter_gather.c           | 1011 ++++++++++
 tests/tcg/hexagon/vector_add_int.c           |   61 +
 target/hexagon/README                        |   81 +-
 target/hexagon/gen_helper_funcs.py           |  115 +-
 target/hexagon/gen_helper_protos.py          |   19 +-
 target/hexagon/gen_tcg_funcs.py              |  257 ++-
 target/hexagon/hex_common.py                 |   13 +
 target/hexagon/imported/allext.idef          |   25 +
 target/hexagon/imported/allext_macros.def    |   25 +
 target/hexagon/imported/allextenc.def        |   20 +
 target/hexagon/imported/allidefs.def         |    1 +
 target/hexagon/imported/encode.def           |    1 +
 target/hexagon/imported/macros.def           |   88 +
 target/hexagon/imported/mmvec/encode_ext.def |  794 ++++++++
 target/hexagon/imported/mmvec/ext.idef       | 2606 ++++++++++++++++++++++++++
 target/hexagon/imported/mmvec/macros.def     |  842 +++++++++
 target/hexagon/meson.build                   |   15 +-
 tests/tcg/hexagon/Makefile.target            |   12 +
 tests/tcg/hexagon/hvx_histogram_row.S        |  294 +++
 46 files changed, 10233 insertions(+), 47 deletions(-)
 create mode 100644 target/hexagon/gen_tcg_hvx.h
 create mode 100644 target/hexagon/mmvec/decode_ext_mmvec.h
 create mode 100644 target/hexagon/mmvec/macros.h
 create mode 100644 target/hexagon/mmvec/mmvec.h
 create mode 100644 target/hexagon/mmvec/system_ext_mmvec.h
 create mode 100644 tests/tcg/hexagon/hvx_histogram_input.h
 create mode 100644 tests/tcg/hexagon/hvx_histogram_row.h
 create mode 100644 target/hexagon/mmvec/decode_ext_mmvec.c
 create mode 100644 target/hexagon/mmvec/system_ext_mmvec.c
 create mode 100644 tests/tcg/hexagon/hvx_histogram.c
 create mode 100644 tests/tcg/hexagon/hvx_misc.c
 create mode 100644 tests/tcg/hexagon/scatter_gather.c
 create mode 100644 tests/tcg/hexagon/vector_add_int.c
 create mode 100644 target/hexagon/imported/allext.idef
 create mode 100644 target/hexagon/imported/allext_macros.def
 create mode 100644 target/hexagon/imported/allextenc.def
 create mode 100644 target/hexagon/imported/mmvec/encode_ext.def
 create mode 100644 target/hexagon/imported/mmvec/ext.idef
 create mode 100755 target/hexagon/imported/mmvec/macros.def
 create mode 100644 tests/tcg/hexagon/hvx_histogram_row.S
Signature · 1 line
2.7.4