qemu-patch-raspberry4/target-arm
Peter Maydell 8c6afa6ab1 target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set
For the A64 instruction set, the only FP/Neon disable trap
is the CPACR FPEN bits, which may indicate "enabled", "disabled"
or "disabled for EL0". Add a bit to the AArch64 tb flags indicating
whether FP/Neon access is currently enabled and make the decoder
emit code to raise exceptions on use of FP/Neon insns if it is not.

We use a new flag in DisasContext rather than borrowing the
existing vfp_enabled flag because the A32/T32 decoder is going
to need both.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
I'm aware this is a rather hard to review patch; sorry.
I have done an exhaustive check that we have fp access checks
in all code paths with the aid of the assertions added in the
next patch plus the code-coverage hack patch I posted to the
list earlier.

This patch is correct as of
09e037354 target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD)
which was the last of the Neon insns to be added, so assuming
no refactoring of the code it should be fine.
2014-04-17 21:34:03 +01:00
..
arm-semi.c cpu: Move opaque field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00
cpu-qom.h target-arm: Implement AArch64 ID and feature registers 2014-02-26 17:20:05 +00:00
cpu.c target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set 2014-04-17 21:34:03 +01:00
cpu.h target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set 2014-04-17 21:34:03 +01:00
cpu64.c target-arm: A64: Make cache ID registers visible to AArch64 2014-02-26 17:20:01 +00:00
crypto_helper.c target-arm: add support for v8 AES instructions 2013-12-17 19:42:25 +00:00
gdbstub.c cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
gdbstub64.c target-arm: Clean up handling of AArch64 PSTATE 2013-12-17 19:42:30 +00:00
helper-a64.c target-arm: A64: Implement FCVTXN 2014-03-17 16:31:53 +00:00
helper-a64.h target-arm: A64: Implement FCVTXN 2014-03-17 16:31:53 +00:00
helper.c target-arm: Provide syndrome information for MMU faults 2014-04-17 21:34:03 +01:00
helper.h target-arm: Add support for generating exceptions with syndrome information 2014-04-17 21:34:03 +01:00
internals.h target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set 2014-04-17 21:34:03 +01:00
iwmmxt_helper.c misc: Use new rotate functions 2013-09-25 21:23:05 +02:00
kvm-consts.h target-arm/kvm-consts.h: Define QEMU constants for known KVM CPUs 2014-02-20 10:35:50 +00:00
kvm-stub.c target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
kvm.c arm: vgic device control api support 2014-02-26 17:20:00 +00:00
kvm32.c target-arm: Split out private-to-target functions into internals.h 2014-04-17 21:34:03 +01:00
kvm64.c target-arm: Add minimal KVM AArch64 support 2013-12-17 19:42:30 +00:00
kvm_arm.h arm: vgic device control api support 2014-02-26 17:20:00 +00:00
machine.c target-arm: Define exception record for AArch64 exceptions 2014-04-17 21:34:03 +01:00
Makefile.objs target-arm: A64: add stubs for a64 specific helpers 2013-12-17 19:42:32 +00:00
neon_helper.c target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD) 2014-03-18 23:10:06 +00:00
op_addsub.h Correct spelling of licensed 2011-07-23 11:26:12 -05:00
op_helper.c target-arm: Add support for generating exceptions with syndrome information 2014-04-17 21:34:03 +01:00
translate-a64.c target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set 2014-04-17 21:34:03 +01:00
translate.c target-arm: Add support for generating exceptions with syndrome information 2014-04-17 21:34:03 +01:00
translate.h target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set 2014-04-17 21:34:03 +01:00