summaryrefslogtreecommitdiffstats
path: root/nuttx/arch/arm/src/lm3s
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2009-05-18 22:14:40 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2009-05-18 22:14:40 +0000
commitfca96cc5646eb14bd6790f34a236622c942c04e3 (patch)
tree4d00ff65a97d81ebf12dd931cd7cfeac4e842b55 /nuttx/arch/arm/src/lm3s
parentd8f72866ff09fb31a2b2a84ba2670f3415b228a0 (diff)
lm3s6918 now does context switches
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1790 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/lm3s')
-rw-r--r--nuttx/arch/arm/src/lm3s/lm3s_vectors.S10
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_vectors.S b/nuttx/arch/arm/src/lm3s/lm3s_vectors.S
index 5be36a90e6..70774c464b 100644
--- a/nuttx/arch/arm/src/lm3s/lm3s_vectors.S
+++ b/nuttx/arch/arm/src/lm3s/lm3s_vectors.S
@@ -298,7 +298,7 @@ lm3s_irqcommon:
* as current stack pointer, then things are relatively easy.
*/
- cmp r0, r1
+ cmp r0, r1 /* Context switch? */
beq 1f /* Branch if no context switch */
/* We are returning with a pending context switch. This case is different
@@ -307,11 +307,11 @@ lm3s_irqcommon:
* values to the stack.
*/
- add r1, r0, #SW_XCPT_REGS /* r2=offset HW save area */
- ldmia r1, {r4-r11} /* Eight registers in HW save area */
+ add r1, r0, #SW_XCPT_SIZE /* R1=Address of HW save area in reg array */
+ ldmia r1, {r4-r11} /* Fetch eight registers in HW save area */
ldr r1, [r0, #(4*REG_SP)] /* R1=Value of SP before interrupt */
- stmdb r1!, {r4-r11} /* Eight registers in HW save area */
- ldmia r0!, {r2-r11} /* Recover R4-R11 + 2 temp values */
+ stmdb r1!, {r4-r11} /* Store eight registers in HW save area */
+ ldmia r0, {r2-r11} /* Recover R4-R11 + 2 temp values */
b 2f /* Re-join common logic */
/* We are returning with no context switch. We simply need to "unwind"