On 2/6/26 10:38 AM, Brian Cain wrote:
A duplex encoding like 0x00000000 decodes as two loads that both write r0.

Add a check in decode_insns() after both sub-instructions decode
successfully to verify they don't write the same destination register.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2696
Signed-off-by: Brian Cain <[email protected]>
---
  target/hexagon/decode.c           | 12 ++++++++++++
  tests/tcg/hexagon/invalid-dups.c  | 23 +++++++++++++++++++++++
  tests/tcg/hexagon/Makefile.target |  6 ++++++
  3 files changed, 41 insertions(+)
  create mode 100644 tests/tcg/hexagon/invalid-dups.c


Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to