Skip to content
  • Peter Maydell's avatar
    target-arm: Clean up handling of AArch64 PSTATE · d356312f
    Peter Maydell authored
    
    
    The env->pstate field is a little odd since it doesn't strictly
    speaking represent an architectural register. However it's convenient
    for QEMU to use it to hold the various PSTATE architectural bits
    in the same format the architecture specifies for SPSR registers
    (since this is the same format the kernel uses for signal handlers
    and the KVM register). Add some structure to how we deal with it:
     * document what env->pstate is
     * add some #defines for various bits in it
     * add helpers for reading/writing it taking account of caching
       of NZCV, and use them where appropriate
     * reset it on startup
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Message-id: 1385645602-18662-3-git-send-email-peter.maydell@linaro.org
    Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
    d356312f