> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathb...@quicinc.com>
> Sent: Thursday, May 2, 2024 9:55 AM
> To: qemu-devel@nongnu.org
> Cc: bc...@quicinc.com; sidn...@quicinc.com; a...@rev.ng; a...@rev.ng;
> ltaylorsimp...@gmail.com; richard.hender...@linaro.org; Laurent Vivier
> <laur...@vivier.eu>
> Subject: [PATCH v4] Hexagon: add PC alignment check and exception
> 
> The Hexagon Programmer's Reference Manual says that the exception 0x1e
> should be raised upon an unaligned program counter. Let's implement that
> and also add some tests.
> 
> Signed-off-by: Matheus Tavares Bernardino <quic_mathb...@quicinc.com>
> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
> ---
> v3: https://lore.kernel.org/qemu-
> devel/5c90567ec28723865e144f386b36f5b676b7a5d3.1714486874.git.quic_ma
> thb...@quicinc.com/
> 
> Changes in v4:
> - Added missing regs to clobber list as mentioned by Taylor.
> - Avoided undefined behavior on package with multiple branches
>   (at test_multi_cof), as suggested offline by Brian.
> 


> a/tests/tcg/hexagon/unaligned_pc_multi_cof.S
> b/tests/tcg/hexagon/unaligned_pc_multi_cof.S
> new file mode 100644
> index 0000000000..10accd0057
> --- /dev/null
> +++ b/tests/tcg/hexagon/unaligned_pc_multi_cof.S
> @@ -0,0 +1,5 @@
> +.org 0x3
> +.global test_multi_cof_unaligned
> +test_multi_cof_unaligned:
> +     nop
> +     jumpr r31

You should be able to put this as an inline asm block with the .org
directive in unaligned_pc.c (outside of any function).

Otherwise
Reviewed-by: Taylor Simpson <ltaylorsimp...@gmail.com>



Reply via email to