On 10/16/2026 1:52 PM, Marco Liebel wrote:
On Wed, Oct 14, 2026 at 2:52 PM Brian Cain <[email protected]> wrote:
Bit 7 of L4_loadw_phys is valid through v81 but reserved starting
with v83. Decode it as a legacy don't-care bit, then reject it for v83
and later.

Signed-off-by: Brian Cain <[email protected]>
---
  target/hexagon/decode.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c
index 89e961331ff..9e8ff5d608c 100644
--- a/target/hexagon/decode.c
+++ b/target/hexagon/decode.c
@@ -721,6 +721,11 @@ int decode_packet(DisasContext *ctx, int max_words, const 
uint32_t *words,
              /* Invalid instruction encoding */
              return 0;
          }
+        /* Bit 7 of L4_loadw_phys became reserved in v83. */
+        if (ctx->hex_def->hex_version >= HEX_VER_V83 &&
The check should include hex_version != HEX_VER_ANY, otherwise it breaks
-d in_asm for any version below 83

I'm not sure that solution is ideal either - the encoding changes for >= v83.  But if it's not shown correctly in in_asm then that's probably a hint that this special case here wasn't the best way to do it or we need a special case in more than one place.


+            insn->opcode == L4_loadw_phys && (encoding32 & 0x80)) {
+            return 0;
+        }
          /*
           * If we saw an extender, mark next word extended so immediate
           * decode works
--
2.34.1


Reply via email to