[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 07/10] target/arm: Take an exception if PC is misaligned
From: |
Peter Maydell |
Subject: |
Re: [PATCH v4 07/10] target/arm: Take an exception if PC is misaligned |
Date: |
Fri, 5 Nov 2021 17:13:18 +0000 |
On Wed, 3 Nov 2021 at 04:11, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> For A64, any input to an indirect branch can cause this.
>
> For A32, many indirect branch paths force the branch to be aligned,
> but BXWritePC does not. This includes the BX instruction but also
> other interworking changes to PC. Prior to v8, this case is UNDEFINED.
> With v8, this is CONSTRAINED UNPREDICTABLE and may either raise an
> exception or force align the PC.
>
> We choose to raise an exception because we have the infrastructure,
> it makes the generated code for gen_bx simpler, and it has the
> possibility of catching more guest bugs.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v4 04/10] target/arm: Split arm_pre_translate_insn, (continued)
- [PATCH v4 04/10] target/arm: Split arm_pre_translate_insn, Richard Henderson, 2021/11/03
- [PATCH v4 05/10] target/arm: Advance pc for arch single-step exception, Richard Henderson, 2021/11/03
- [PATCH v4 08/10] target/arm: Assert thumb pc is aligned, Richard Henderson, 2021/11/03
- [PATCH v4 10/10] tests/tcg: Add arm and aarch64 pc alignment tests, Richard Henderson, 2021/11/03
- [PATCH v4 06/10] target/arm: Split compute_fsr_fsc out of arm_deliver_fault, Richard Henderson, 2021/11/03
- [PATCH v4 09/10] target/arm: Suppress bp for exceptions with more priority, Richard Henderson, 2021/11/03
- [PATCH v4 07/10] target/arm: Take an exception if PC is misaligned, Richard Henderson, 2021/11/03
- Re: [PATCH v4 07/10] target/arm: Take an exception if PC is misaligned,
Peter Maydell <=
- Re: [PATCH v4 00/10] target/arm: Fix insn exception priorities, Peter Maydell, 2021/11/08