target/arm: Fix handling of cortex-m FTYPE flag in EXCRET
commitf900b1e5b087a02199fbb6de7038828008e9e419
authorJean-Hugues DeschĂȘnes <Jean-Hugues.Deschenes@ossiaco.com>
Tue, 26 Nov 2019 13:55:36 +0000 (26 13:55 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 26 Nov 2019 13:55:36 +0000 (26 13:55 +0000)
tree28fa5ced49099f7d06556ad80c54a3d932c8f170
parent4ecc984210ca1bf508a96a550ec8a93a5f833f6c
target/arm: Fix handling of cortex-m FTYPE flag in EXCRET

According to the PushStack() pseudocode in the armv7m RM,
bit 4 of the LR should be set to NOT(CONTROL.PFCA) when
an FPU is present. Current implementation is doing it for
armv8, but not for armv7. This patch makes the existing
logic applicable to both code paths.

Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@ossiaco.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/m_helper.c