On 7/16/2026 11:06 AM, Matheus Tavares Bernardino wrote: > hexagon_get_tb_cpu_state() detects a misaligned PC and raises an > exception, but it passed HEX_CAUSE_PC_NOT_ALIGNED (a cause code) as the > event argument to hexagon_raise_exception_err(), whose second parameter > is the event index (it ends up in cs->exception_index). This causes an > infinite reboot loop when we reache a misaligned PC. > > Similarly, gen_exception_decode_fail() is called with a cause code > (HEX_CAUSE_INVALID_PACKET) but unconditionally routes it through > gen_exception(), which treats its argument as an event index and stores > it directly in cs->exception_index. > > Signed-off-by: Matheus Tavares Bernardino > <[email protected]> > --- > target/hexagon/cpu.c | 3 ++- > target/hexagon/translate.c | 4 ++++ > 2 files changed, 6 insertions(+), 1 deletion(-) >
Reviewed-by: Pierrick Bouvier <[email protected]>
