Skip to content

Hexagon (target/hexagon) Check opcodes versions

Taylor Simpson qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 10 repliesIn review
  2. v28 patches 7 repliesSuperseded
  3. v18 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Use a struct to hold Hexagon definition rather than a simple enum Suggested by Anton Johansson <[email protected]>

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Hexagon (target/hexagon) Properly handle Hexagon CPU versiontarget/hexagon/cpu-qom.h target/hexagon/cpu.c target/hexagon/cpu.h+57 -181 reply
2/8Hexagon (linux-user/hexagon) Identify Hexagon version in ELF filelinux-user/hexagon/elfload.c+26 -171 reply
3/8Hexagon (target/hexagon) Add Hexagon definition field to DisasContexttarget/hexagon/translate.c target/hexagon/translate.h+2 -01 reply
4/8Hexagon (target/hexagon) Introduce tag_rev_info.c.inctarget/hexagon/tag_rev_info.c.inc+613 -02 replies
5/8Hexagon (target/hexagon) Check each opcode against current CPU definitiontarget/hexagon/decode.c target/hexagon/decode.h+29 -01 reply
6/8Hexagon (target/hexagon) Disassembly of invalid packetsdisas/hexagon.c target/hexagon/cpu.c target/hexagon/cpu_bits.h +3 more+37 -91 reply
7/8tests/tcg/hexagon: Add test for revision-gated instruction decodingtests/tcg/hexagon/Makefile.target tests/tcg/hexagon/check_rev_gating.c+147 -01 reply
8/8Hexagon (target/hexagon) Remove snprint_a_pkt_debugtarget/hexagon/printinsn.c target/hexagon/printinsn.h+0 -321 reply

Reviews trailers per patch

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

PatchMatheus Tavares BernardinoBrian CainTaylor SimpsonAnton JohanssonMarco Liebel
SeriesCo-authored-by Co-authored-by
1/8Co-authored-by Co-authored-by R-b
2/8Co-authored-by Co-authored-by R-b
3/8Co-authored-by Co-authored-by R-b
4/8Co-authored-by Co-authored-by R-b
5/8Co-authored-by Co-authored-by R-b
6/8Co-authored-by Co-authored-by R-b
7/8Co-authored-by Co-authored-by R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/8] Hexagon (target/hexagon) Check opcodes versions

Currently, all versions of Hexagon CPU are treated the same, and all opcodes are able to run on any version. This series changes the behavior such that only the opcodes available on the currently executing Hexagon CPU version can execute.

Changes include:
Mark which Hexagon CPU version is currently executing Check that each opcode is supported in the Hexagon CPU version If not, generate INVALID_PACKET opcode, which is converted to SIGILL Properly handle disassembly (-d in_asm)
Test case added

Changes in v2:
- Rebase with Brian Cain's "Handle some invalid encodings" series
- Add older opcodes to tag_rev_info.c.inc
- Change tag_rev_info to use HexagonVersion
Suggested by Richard Henderson <[email protected]>
- Disassembly includes valid opcodes inside packet with invalid opcodes
- Remove unused function - snpring_a_pkt_debug

Changes in v3:
- Use a struct to hold Hexagon definition rather than a simple enum Suggested by Anton Johansson <[email protected]>

Brian Cain (1):
tests/tcg/hexagon: Add test for revision-gated instruction decoding

Matheus Tavares Bernardino (1):
Hexagon (target/hexagon) Introduce tag_rev_info.c.inc

Taylor Simpson (6):
Hexagon (target/hexagon) Properly handle Hexagon CPU version Hexagon (linux-user/hexagon) Identify Hexagon version in ELF file Hexagon (target/hexagon) Add Hexagon definition field to DisasContext Hexagon (target/hexagon) Check each opcode against current CPU
definition
Hexagon (target/hexagon) Disassembly of invalid packets Hexagon (target/hexagon) Remove snprint_a_pkt_debug

 target/hexagon/cpu-qom.h             |  27 ++
 target/hexagon/cpu.h                 |   2 +
 target/hexagon/cpu_bits.h            |   4 +-
 target/hexagon/decode.h              |   2 +
 target/hexagon/printinsn.h           |   4 +-
 target/hexagon/translate.h           |   1 +
 disas/hexagon.c                      |   3 +-
 linux-user/hexagon/elfload.c         |  43 +-
 target/hexagon/cpu.c                 |  48 ++-
 target/hexagon/decode.c              |  52 ++-
 target/hexagon/printinsn.c           |  40 +-
 target/hexagon/translate.c           |   1 +
 tests/tcg/hexagon/check_rev_gating.c | 141 ++++++
 target/hexagon/tag_rev_info.c.inc    | 613 +++++++++++++++++++++++++++
 tests/tcg/hexagon/Makefile.target    |   6 +
 15 files changed, 911 insertions(+), 76 deletions(-)
 create mode 100644 tests/tcg/hexagon/check_rev_gating.c
 create mode 100644 target/hexagon/tag_rev_info.c.inc
Signature · 1 line
2.43.0