> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathb...@quicinc.com>
> Sent: Thursday, May 4, 2023 1:57 PM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimp...@quicinc.com>
> Subject: [PATCH] Hexagon (decode): look for pkts with multiple insns at the
> same slot
> 
> Each slot in a packet can be assigned to at most one instruction.
> Although the assembler generally ought to enforce this rule, we better be
> safe than sorry and also do some check to properly throw an "invalid packet"
> exception on wrong slot assignments.
> 
> This should also make it easier to debug possible future errors caused by
> missing updates to `find_iclass_slots()` rules in target/hexagon/iclass.c.
> 
> Signed-off-by: Matheus Tavares Bernardino <quic_mathb...@quicinc.com>
> Reviewed-by: Taylor Simpson <tsimp...@quicinc.com>
> ---
> I extracted this patch from [1]. There are more changes needed to support
> v73 in qemu, so the first patch in that series doesn't make sense to be
> incorporated yet. This one is useful nonetheless.
> 
> [1]: https://lore.kernel.org/qemu-
> devel/cover.1673616964.git.quic_mathb...@quicinc.com/
> 
>  target/hexagon/decode.c           | 30 +++++++++++++++++++++++++++---
>  tests/tcg/hexagon/invalid-slots.c | 29 +++++++++++++++++++++++++++++
> tests/tcg/hexagon/Makefile.target | 11 +++++++++++
>  3 files changed, 67 insertions(+), 3 deletions(-)  create mode 100644
> tests/tcg/hexagon/invalid-slots.c


This breaks the -d in_asm output.

We need to guard the call to decode_set_slot_number with !disas_only.

Thanks,
Taylor


Reply via email to