diff --git a/arch/arm/src/kinetis/kinetis_vectors.S b/arch/arm/src/kinetis/kinetis_vectors.S index be597cfa9f..dd2e35aeac 100644 --- a/arch/arm/src/kinetis/kinetis_vectors.S +++ b/arch/arm/src/kinetis/kinetis_vectors.S @@ -720,7 +720,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. * @@ -756,7 +756,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 @@ -764,7 +764,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 @@ -787,7 +788,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 @@ -797,15 +799,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 */ diff --git a/arch/arm/src/lm/lm_vectors.S b/arch/arm/src/lm/lm_vectors.S index bdd65a543a..ede558ec70 100644 --- a/arch/arm/src/lm/lm_vectors.S +++ b/arch/arm/src/lm/lm_vectors.S @@ -323,7 +323,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. * @@ -359,7 +359,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 @@ -367,7 +367,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 @@ -390,7 +391,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 @@ -400,15 +402,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 */ diff --git a/arch/arm/src/lpc17xx/lpc17_vectors.S b/arch/arm/src/lpc17xx/lpc17_vectors.S index dc4a7a305c..d88fd88ce8 100644 --- a/arch/arm/src/lpc17xx/lpc17_vectors.S +++ b/arch/arm/src/lpc17xx/lpc17_vectors.S @@ -332,7 +332,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. * @@ -368,7 +368,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 @@ -376,7 +376,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 @@ -399,7 +400,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 @@ -409,15 +411,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 */ diff --git a/arch/arm/src/sam34/sam_vectors.S b/arch/arm/src/sam34/sam_vectors.S index 6ef3e2b809..74d0dafb48 100644 --- a/arch/arm/src/sam34/sam_vectors.S +++ b/arch/arm/src/sam34/sam_vectors.S @@ -337,7 +337,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. * @@ -373,7 +373,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 @@ -381,7 +381,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 @@ -404,7 +405,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 @@ -414,15 +416,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 */ diff --git a/arch/arm/src/stm32/stm32_vectors.S b/arch/arm/src/stm32/stm32_vectors.S index da9eea46c0..a70d68cfad 100644 --- a/arch/arm/src/stm32/stm32_vectors.S +++ b/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 */