unicorn/qemu/target-arm
Peter Maydell a6aac0dbb4
target-arm: Clean up trap/undef handling of SRS
The SRS instruction is:
* UNDEFINED in Hyp mode
* UNPREDICTABLE in User or System mode
* UNPREDICTABLE if the specified mode isn't accessible
* trapped to EL3 if EL3 is AArch64 and we are at Secure EL1

Clean up the code to handle all these cases cleanly, including
picking UNDEF as our choice of UNPREDICTABLE behaviour rather
blindly trusting the mode field passed in the instruction.
As part of this, move the check for IS_USER into gen_srs()
itself rather than having it done by the caller.

The exception is that we don't UNDEF for calls from System
mode, which need a runtime check. This will be dealt with in
the following commits.

Backports commit cbc0326b6fb905f80b7cef85b24571f7ebb62077 from qemu
2018-02-20 15:02:45 -05:00
..
arm_ldst.h import 2015-08-21 15:04:50 +08:00
cpu-qom.h target-arm: Use a single entry point for AArch64 and AArch32 exceptions 2018-02-18 22:34:31 -05:00
cpu.c target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
cpu.h target-arm: Report correct syndrome for FPEXC32_EL2 traps 2018-02-20 15:00:32 -05:00
cpu64.c target-arm: Enable EL3 for Cortex-A53 and Cortex-A57 2018-02-20 11:31:44 -05:00
crypto_helper.c target-arm: Clean up includes 2018-02-17 21:09:32 -05:00
helper-a64.c target-arm: Move aarch64_cpu_do_interrupt() to helper.c 2018-02-18 22:23:06 -05:00
helper-a64.h import 2015-08-21 15:04:50 +08:00
helper.c target-arm: Report correct syndrome for FPEXC32_EL2 traps 2018-02-20 15:00:32 -05:00
helper.h target-arm: Add isread parameter to CPAccessFns 2018-02-20 11:24:17 -05:00
internals.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
iwmmxt_helper.c target-arm: Clean up includes 2018-02-17 21:09:32 -05:00
kvm-consts.h import 2015-08-21 15:04:50 +08:00
Makefile.objs delete sparc32_dma.h & arm-semi.c 2017-01-19 15:10:41 +08:00
neon_helper.c target-arm: Clean up includes 2018-02-17 21:09:32 -05:00
op_addsub.h import 2015-08-21 15:04:50 +08:00
op_helper.c target-arm: Report correct syndrome for FPEXC32_EL2 traps 2018-02-20 15:00:32 -05:00
psci.c import 2015-08-21 15:04:50 +08:00
translate-a64.c target-arm: Add isread parameter to CPAccessFns 2018-02-20 11:24:17 -05:00
translate.c target-arm: Clean up trap/undef handling of SRS 2018-02-20 15:02:45 -05:00
translate.h tcg: Remove gen_intermediate_code_pc 2018-02-17 15:23:59 -05:00
unicorn.h arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00
unicorn_aarch64.c target-arm: rename c1_coproc to cpacr_el1 2018-02-12 20:46:00 -05:00
unicorn_arm.c target-arm: Add registers for PMSAv7 2018-02-17 15:22:43 -05:00