Hexagon (decode): look for pkts with multiple insns at the same slot
authorMatheus Tavares Bernardino <quic_mathbern@quicinc.com>
Mon, 8 May 2023 13:37:23 +0000 (10:37 -0300)
committerTaylor Simpson <tsimpson@quicinc.com>
Thu, 18 May 2023 19:40:52 +0000 (12:40 -0700)
commit14edcf11e297252c995d5909144f3751b7383efc
tree4bc25926cc6f325aa0d879721ac89d8ebbbf54a6
parented9b28fb009a7944fcda89c3ced3cb6ad4a92ea1
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.

Co-authored-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <f8b829443523568823d062adf8bf6659bc6d4a3f.1683552984.git.quic_mathbern@quicinc.com>
target/hexagon/decode.c
tests/tcg/hexagon/Makefile.target
tests/tcg/hexagon/invalid-slots.c [new file with mode: 0644]