OSDN Git Service

target/arm: New function armv7m_nvic_set_pending_lazyfp()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:36:02 +0000 (17:36 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:36:02 +0000 (17:36 +0100)
commita99ba8ab1601904e0fa20325192fc850362ce80e
treeaead4ab361eebc72e22712989ef700aecf1b8b8a
parentfa6252a988dbe440cd6087bf93cbe0887f0c401b
target/arm: New function armv7m_nvic_set_pending_lazyfp()

In the v7M architecture, if an exception is generated in the process
of doing the lazy stacking of FP registers, the handling of
possible escalation to HardFault is treated differently to the normal
approach: it works based on the saved information about exception
readiness that was stored in the FPCCR when the stack frame was
created. Provide a new function armv7m_nvic_set_pending_lazyfp()
which pends exceptions during lazy stacking, and implements
this logic.

This corresponds to the pseudocode TakePreserveFPException().

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