[PATCH v3 0/4] Handle some invalid encodings

Brian Cain posted 4 patches 9 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260210133355.16093-1-brian.cain@oss.qualcomm.com
Maintainers: Brian Cain <brian.cain@oss.qualcomm.com>, Laurent Vivier <laurent@vivier.eu>, Pierrick Bouvier <pierrick.bouvier@linaro.org>
target/hexagon/cpu_bits.h            |   1 +
target/hexagon/insn.h                |   6 +
linux-user/hexagon/cpu_loop.c        |   5 +
target/hexagon/decode.c              |  59 +++++++++-
target/hexagon/translate.c           |  39 ++++++-
tests/tcg/hexagon/invalid-encoding.c | 106 +++++++++++++++++
tests/tcg/hexagon/invalid-slots.c    |  76 +++++++++---
tests/tcg/hexagon/multiple-writes.c  | 169 +++++++++++++++++++++++++++
target/hexagon/gen_trans_funcs.py    |  10 ++
tests/tcg/hexagon/Makefile.target    |   8 +-
10 files changed, 449 insertions(+), 30 deletions(-)
create mode 100644 tests/tcg/hexagon/invalid-encoding.c
create mode 100644 tests/tcg/hexagon/multiple-writes.c
[PATCH v3 0/4] Handle some invalid encodings
Posted by Brian Cain 9 hours ago
Fix the issues reported by Alex Rønne Petersen causing zig test suite
failures.  The 0x0 case is a conflicting "multiple register write" - the
handler here will cover duplexes but not the more general case of multiple
register writes.  I'll include that in a subsequent patchset.

v2: use a signal handler for SIGILL, combine the tests.  S-b Pierrick.

v3:
  Dropped "Reject duplex encodings" and added "Detect register write
  conflicts..." -> more general algo S-b Taylor.  This patch moved over the
  test_zero() case covering the same 0x00000000 inst encoding R-b Alex.

Brian Cain (4):
  target/hexagon: Fix invalid duplex decoding
  target/hexagon: Return decode failure for invalid non-duplex encodings
  tests/tcg/hexagon: Handle SIGILL internally in invalid-slots test
  target/hexagon: Detect register write conflicts with bitmap algorithm

 target/hexagon/cpu_bits.h            |   1 +
 target/hexagon/insn.h                |   6 +
 linux-user/hexagon/cpu_loop.c        |   5 +
 target/hexagon/decode.c              |  59 +++++++++-
 target/hexagon/translate.c           |  39 ++++++-
 tests/tcg/hexagon/invalid-encoding.c | 106 +++++++++++++++++
 tests/tcg/hexagon/invalid-slots.c    |  76 +++++++++---
 tests/tcg/hexagon/multiple-writes.c  | 169 +++++++++++++++++++++++++++
 target/hexagon/gen_trans_funcs.py    |  10 ++
 tests/tcg/hexagon/Makefile.target    |   8 +-
 10 files changed, 449 insertions(+), 30 deletions(-)
 create mode 100644 tests/tcg/hexagon/invalid-encoding.c
 create mode 100644 tests/tcg/hexagon/multiple-writes.c

-- 
2.34.1