summaryrefslogtreecommitdiff
path: root/libcpu/arm/cortex-m0
diff options
context:
space:
mode:
authorbernard <[email protected]>2014-08-01 12:03:24 +0800
committerbernard <[email protected]>2014-08-01 12:03:24 +0800
commit582aff86ed91dad23e8ace36f8466ca20c80bebf (patch)
tree77b4338a8afe48a1c45be9f4bab9b40de1543c5b /libcpu/arm/cortex-m0
parent516711dc1d08ed332704ec53fd377edbdd0b9834 (diff)
parent2fdef817b1a0ce82ef61bde11f41e651c1cc8d79 (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-threadv2.0.0_beta
Diffstat (limited to 'libcpu/arm/cortex-m0')
-rw-r--r--libcpu/arm/cortex-m0/context_gcc.S8
-rw-r--r--libcpu/arm/cortex-m0/context_iar.S8
-rw-r--r--libcpu/arm/cortex-m0/context_rvds.S8
3 files changed, 12 insertions, 12 deletions
diff --git a/libcpu/arm/cortex-m0/context_gcc.S b/libcpu/arm/cortex-m0/context_gcc.S
index 997c345179..3186a5ae9f 100644
--- a/libcpu/arm/cortex-m0/context_gcc.S
+++ b/libcpu/arm/cortex-m0/context_gcc.S
@@ -79,8 +79,8 @@ _reswitch:
STR R1, [R0]
BX LR
-/* R0 --> swith from thread stack
- * R1 --> swith to thread stack
+/* R0 --> switch from thread stack
+ * R1 --> switch to thread stack
* psr, pc, LR, R12, R3, R2, R1, R0 are pushed into [from] stack
*/
.global PendSV_Handler
@@ -103,7 +103,7 @@ PendSV_Handler:
LDR R0, =rt_interrupt_from_thread
LDR R1, [R0]
CMP R1, #0x00
- BEQ swtich_to_thread /* skip register save at the first time */
+ BEQ switch_to_thread /* skip register save at the first time */
MRS R1, PSP /* get from thread stack pointer */
@@ -118,7 +118,7 @@ PendSV_Handler:
MOV R6, R10
MOV R7, R11
STMIA R1!, {R4 - R7} /* push thread {R8 - R11} high register to thread stack */
-swtich_to_thread:
+switch_to_thread:
LDR R1, =rt_interrupt_to_thread
LDR R1, [R1]
LDR R1, [R1] /* load thread stack pointer */
diff --git a/libcpu/arm/cortex-m0/context_iar.S b/libcpu/arm/cortex-m0/context_iar.S
index f1318e552d..67ea808d8c 100644
--- a/libcpu/arm/cortex-m0/context_iar.S
+++ b/libcpu/arm/cortex-m0/context_iar.S
@@ -81,8 +81,8 @@ _reswitch
STR r1, [r0]
BX LR
-; r0 --> swith from thread stack
-; r1 --> swith to thread stack
+; r0 --> switch from thread stack
+; r1 --> switch to thread stack
; psr, pc, lr, r12, r3, r2, r1, r0 are pushed into [from] stack
EXPORT PendSV_Handler
PendSV_Handler:
@@ -104,7 +104,7 @@ PendSV_Handler:
LDR r0, =rt_interrupt_from_thread
LDR r1, [r0]
CMP r1, #0x00
- BEQ swtich_to_thread ; skip register save at the first time
+ BEQ switch_to_thread ; skip register save at the first time
MRS r1, psp ; get from thread stack pointer
@@ -120,7 +120,7 @@ PendSV_Handler:
MOV r7, r11
STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack
-swtich_to_thread
+switch_to_thread
LDR r1, =rt_interrupt_to_thread
LDR r1, [r1]
LDR r1, [r1] ; load thread stack pointer
diff --git a/libcpu/arm/cortex-m0/context_rvds.S b/libcpu/arm/cortex-m0/context_rvds.S
index 9c2f42ac83..89ac029282 100644
--- a/libcpu/arm/cortex-m0/context_rvds.S
+++ b/libcpu/arm/cortex-m0/context_rvds.S
@@ -85,8 +85,8 @@ _reswitch
BX LR
ENDP
-; r0 --> swith from thread stack
-; r1 --> swith to thread stack
+; r0 --> switch from thread stack
+; r1 --> switch to thread stack
; psr, pc, lr, r12, r3, r2, r1, r0 are pushed into [from] stack
PendSV_Handler PROC
EXPORT PendSV_Handler
@@ -108,7 +108,7 @@ PendSV_Handler PROC
LDR r0, =rt_interrupt_from_thread
LDR r1, [r0]
CMP r1, #0x00
- BEQ swtich_to_thread ; skip register save at the first time
+ BEQ switch_to_thread ; skip register save at the first time
MRS r1, psp ; get from thread stack pointer
@@ -124,7 +124,7 @@ PendSV_Handler PROC
MOV r7, r11
STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack
-swtich_to_thread
+switch_to_thread
LDR r1, =rt_interrupt_to_thread
LDR r1, [r1]
LDR r1, [r1] ; load thread stack pointer