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 &&
+            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