qemu/target
Jeff Kubascik 855532912b target/arm: adjust program counter for wfi exception in AArch32
The wfi instruction can be configured to be trapped by a higher exception
level, such as the EL2 hypervisor. When the instruction is trapped, the
program counter should contain the address of the wfi instruction that
caused the exception. The program counter is adjusted for this in the wfi op
helper function.

However, this correction is done to env->pc, which only applies to AArch64
mode. For AArch32, the program counter is stored in env->regs[15]. This
adds an if-else statement to modify the correct program counter location
based on the the current CPU mode.

Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-17 14:27:16 +00:00
..
alpha tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
arm target/arm: adjust program counter for wfi exception in AArch32 2020-01-17 14:27:16 +00:00
cris tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
hppa tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
i386 tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
lm32 tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
m68k tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
microblaze tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
mips tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
moxie tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
nios2 tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
openrisc tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
ppc tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
riscv tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
s390x tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
sh4 tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
sparc tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
tilegx tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
tricore tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
unicore32 tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
xtensa tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00