target/arm: Activate M-profile floating point context when FPCCR.ASPEN is set
commit6000531e19964756673a5f4b694a649ef883605a
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:36:01 +0000 (29 17:36 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:36:01 +0000 (29 17:36 +0100)
tree8b5d4913ba1a8f1b7dd30a669b89940e196b0de6
parent6d60c67a1a03be32c3342aff6604cdc5095088d1
target/arm: Activate M-profile floating point context when FPCCR.ASPEN is set

The M-profile FPCCR.ASPEN bit indicates that automatic floating-point
context preservation is enabled. Before executing any floating-point
instruction, if FPCCR.ASPEN is set and the CONTROL FPCA/SFPA bits
indicate that there is no active floating point context then we
must create a new context (by initializing FPSCR and setting
FPCA/SFPA to indicate that the context is now active). In the
pseudocode this is handled by ExecuteFPCheck().

Implement this with a new TB flag which tracks whether we
need to create a new FP context.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190416125744.27770-20-peter.maydell@linaro.org
target/arm/cpu.h
target/arm/helper.c
target/arm/translate.c
target/arm/translate.h