]> Git Repo - qemu.git/commitdiff
target/arm: Correct condition for v8M callee stack push
authorPeter Maydell <[email protected]>
Mon, 8 Oct 2018 13:55:02 +0000 (14:55 +0100)
committerPeter Maydell <[email protected]>
Mon, 8 Oct 2018 13:55:02 +0000 (14:55 +0100)
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: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 20181002145940[email protected]

target/arm/helper.c

index 64b15645944e3e0d85f1e8d8a08bb02eb9cb6261..073fb3c5cb0c273263f4f00d57bc962401d3d7e1 100644 (file)
@@ -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);
                 }
This page took 0.031457 seconds and 4 git commands to generate.