• P
    target-arm: A64: Correctly fault FP/Neon if CPACR.FPEN set · 8c6afa6a
    Peter Maydell 提交于
    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: NPeter Maydell <peter.maydell@linaro.org>
    Acked-by: NPeter 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
    09e03735 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.
    8c6afa6a
cpu.h 44.2 KB