[rtems commit] arm: Avoid duplicate move from CPSR

Sebastian Huber sebh at rtems.org
Mon Jan 17 07:17:53 UTC 2022


Module:    rtems
Branch:    master
Commit:    41a1903dd97b3acd1e290c936de4d865d35a0fe4
Changeset: http://git.rtems.org/rtems/commit/?id=41a1903dd97b3acd1e290c936de4d865d35a0fe4

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Jan 17 08:11:48 2022 +0100

arm: Avoid duplicate move from CPSR

Update #4579.

---

 cpukit/score/cpu/arm/arm_exc_interrupt.S | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/cpukit/score/cpu/arm/arm_exc_interrupt.S b/cpukit/score/cpu/arm/arm_exc_interrupt.S
index 82f7a08..a867ee6 100644
--- a/cpukit/score/cpu/arm/arm_exc_interrupt.S
+++ b/cpukit/score/cpu/arm/arm_exc_interrupt.S
@@ -138,9 +138,6 @@ _ARMV4_Exception_interrupt:
 	/* Restore stack pointer */
 	mov	sp, NON_VOLATILE_SCRATCH
 
-	/* Save CPSR in non-volatile register */
-	mrs	NON_VOLATILE_SCRATCH, CPSR
-
 	/* Decrement levels and determine thread dispatch state */
 	eor	r1, r1, r12
 	sub	r12, r12, #1
@@ -159,9 +156,11 @@ _ARMV4_Exception_interrupt:
 	cmp	r1, #0
 	bne	.Lthread_dispatch_done
 
-	/* Thread dispatch */
+	/* Save CPSR in non-volatile register */
 	mrs	NON_VOLATILE_SCRATCH, CPSR
 
+	/* Thread dispatch */
+
 .Ldo_thread_dispatch:
 
 	/* Set ISR dispatch disable and thread dispatch disable level to one */



More information about the vc mailing list