diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-10-08 14:55:02 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-10-08 14:55:02 +0100 |
| commit | 7b73a1ca05b33d42278ce29cea4652e22d408165 (patch) | |
| tree | 4b1637129b679e4cdf3773ecda2141e5485e5f36 /target/arm/helper.c | |
| parent | 846690dee8ca6a4143d20b39e894fd1f24627561 (diff) | |
| download | focaccia-qemu-7b73a1ca05b33d42278ce29cea4652e22d408165.tar.gz focaccia-qemu-7b73a1ca05b33d42278ce29cea4652e22d408165.zip | |
target/arm: Correct condition for v8M callee stack push
In v7m_exception_taken() we were incorrectly using a "LR bit EXCRET.ES is 1" check when it should be 0 (compare the pseudocode ExceptionTaken() function). This meant we didn't stack the callee-saved registers when tailchaining from a NonSecure to a Secure exception. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181002145940.30931-1-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/helper.c')
| -rw-r--r-- | target/arm/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c index 64b1564594..073fb3c5cb 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6938,7 +6938,7 @@ static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr, bool dotailchain, * not already saved. */ if (lr & R_V7M_EXCRET_DCRS_MASK && - !(dotailchain && (lr & R_V7M_EXCRET_ES_MASK))) { + !(dotailchain && !(lr & R_V7M_EXCRET_ES_MASK))) { push_failed = v7m_push_callee_stack(cpu, lr, dotailchain, ignore_stackfaults); } |