summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_vectors.S
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-12-23 14:29:25 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-12-23 14:29:25 -0600
commitf656d2626ea89ffa54f9365d09b5bd5b0adc84b9 (patch)
tree434dcdcf5dc99ccb50a38db58bfab2b830636269 /nuttx/arch/arm/src/stm32/stm32_vectors.S
parenta7755824e30768f52e0d4bc24b43cf4057f7667e (diff)
downloadpx4-nuttx-f656d2626ea89ffa54f9365d09b5bd5b0adc84b9.tar.gz
px4-nuttx-f656d2626ea89ffa54f9365d09b5bd5b0adc84b9.tar.bz2
px4-nuttx-f656d2626ea89ffa54f9365d09b5bd5b0adc84b9.zip
Fix a duplicate label introduce in recent commit
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_vectors.S')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_vectors.S18
1 files changed, 10 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_vectors.S b/nuttx/arch/arm/src/stm32/stm32_vectors.S
index da9eea46c..a70d68cfa 100644
--- a/nuttx/arch/arm/src/stm32/stm32_vectors.S
+++ b/nuttx/arch/arm/src/stm32/stm32_vectors.S
@@ -347,7 +347,7 @@ exception_common:
*/
cmp r0, r1 /* Context switch? */
- beq 1f /* Branch if no context switch */
+ beq 2f /* Branch if no context switch */
/* We are returning with a pending context switch.
*
@@ -383,7 +383,7 @@ exception_common:
#else
ldmia r0, {r2-r11} /* Recover R4-R11 + 2 temp values */
#endif
- b 2f /* Re-join common logic */
+ b 3f /* Re-join common logic */
/* We are returning with no context switch. We simply need to "unwind"
* the same stack frame that we created
@@ -391,7 +391,8 @@ exception_common:
* Here:
* r1 = Address of the return stack (same as r0)
*/
-1:
+
+2:
#ifdef CONFIG_NUTTX_KERNEL
ldmia r1!, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#else
@@ -414,7 +415,8 @@ exception_common:
* r3 = primask or basepri
* r4-r11 = restored register values
*/
-2:
+
+3:
#ifdef CONFIG_NUTTX_KERNEL
/* The EXC_RETURN value will be 0xfffffff9 (privileged thread) or 0xfffffff1
@@ -424,15 +426,15 @@ exception_common:
mrs r2, control /* R2=Contents of the control register */
tst r14, #EXC_RETURN_PROCESS_STACK /* nonzero if context on process stack */
- beq 3f /* Branch if privileged */
+ beq 4f /* Branch if privileged */
orr r2, r2, #1 /* Unprivileged mode */
msr psp, r1 /* R1=The process stack pointer */
- b 4f
-3:
+ b 5f
+4:
bic r2, r2, #1 /* Privileged mode */
msr msp, r1 /* R1=The main stack pointer */
-4:
+5:
msr control, r2 /* Save the updated control register */
#else
msr msp, r1 /* Recover the return MSP value */