summaryrefslogtreecommitdiff
path: root/libcpu/m16c
diff options
context:
space:
mode:
authorSherman <[email protected]>2022-01-26 17:48:46 +0800
committerSherman <[email protected]>2022-01-26 17:48:46 +0800
commit544c721d89ee7c6e7d3f88dd5bd555a221d8222e (patch)
treeaafdd34b49eca60159844a6712883cd01fd478b7 /libcpu/m16c
parentfc3c29df709798bcbf0c40e4146e628975c40b9e (diff)
parent032ce63ed39c1bbb9f68068c0cf8b876771f27c8 (diff)
Merge branch 'master' of github.com:RT-Thread/rt-thread
Diffstat (limited to 'libcpu/m16c')
-rw-r--r--libcpu/m16c/m16c62p/context_gcc.S18
-rw-r--r--libcpu/m16c/m16c62p/context_iar.S10
-rw-r--r--libcpu/m16c/m16c62p/context_iar.asm10
3 files changed, 19 insertions, 19 deletions
diff --git a/libcpu/m16c/m16c62p/context_gcc.S b/libcpu/m16c/m16c62p/context_gcc.S
index 45a2080800..0f131a922d 100644
--- a/libcpu/m16c/m16c62p/context_gcc.S
+++ b/libcpu/m16c/m16c62p/context_gcc.S
@@ -11,32 +11,32 @@
* Date Author Notes
* 2010-04-09 fify the first version
* 2010-04-19 fify rewrite rt_hw_interrupt_disable/enable fuction
- * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
+ * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
*/
.section .text
-
+
.globl _rt_interrupt_from_thread
.globl _rt_interrupt_to_thread
- .global _os_context_switch
- .type _os_context_switch, @function
+ .global _os_context_switch
+ .type _os_context_switch, @function
_os_context_switch:
PUSHM R0,R1,R2,R3,A0,A1,SB,FB
-
+
MOV.W _rt_interrupt_from_thread, A0
STC ISP, [A0]
MOV.W _rt_interrupt_to_thread, A0
LDC [A0], ISP
POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore registers from the new task's stack
- REIT ; Return from interrup
-
+ REIT ; Return from interrup
+
/*
* void rt_hw_context_switch_to(rt_uint32 to);
* this fucntion is used to perform the first thread switch
*/
- .global _rt_hw_context_switch_to
- .type _rt_hw_context_switch_to, @function
+ .global _rt_hw_context_switch_to
+ .type _rt_hw_context_switch_to, @function
_rt_hw_context_switch_to:
ENTER #0x0
MOV.W 0x5[FB], A0
diff --git a/libcpu/m16c/m16c62p/context_iar.S b/libcpu/m16c/m16c62p/context_iar.S
index 9415b2bdea..ada3bd4c28 100644
--- a/libcpu/m16c/m16c62p/context_iar.S
+++ b/libcpu/m16c/m16c62p/context_iar.S
@@ -11,7 +11,7 @@
* Date Author Notes
* 2010-04-09 fify the first version
* 2010-04-19 fify rewrite rt_hw_interrupt_disable/enable fuction
- * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
+ * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
*
* For : Renesas M16C
* Toolchain : IAR's EW for M16C v3.401
@@ -39,19 +39,19 @@ rt_hw_interrupt_disable:
rt_hw_interrupt_enable:
LDC R0, FLG ;fify 20100419
RTS
-
+
.EVEN
os_context_switch:
PUSHM R0,R1,R2,R3,A0,A1,SB,FB
-
+
MOV.W rt_interrupt_from_thread, A0
STC ISP, [A0]
MOV.W rt_interrupt_to_thread, A0
LDC [A0], ISP
POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore registers from the new task's stack
- REIT ; Return from interrup
-
+ REIT ; Return from interrup
+
/*
* void rt_hw_context_switch_to(rt_uint32 to);
* r0 --> to
diff --git a/libcpu/m16c/m16c62p/context_iar.asm b/libcpu/m16c/m16c62p/context_iar.asm
index 9415b2bdea..ada3bd4c28 100644
--- a/libcpu/m16c/m16c62p/context_iar.asm
+++ b/libcpu/m16c/m16c62p/context_iar.asm
@@ -11,7 +11,7 @@
* Date Author Notes
* 2010-04-09 fify the first version
* 2010-04-19 fify rewrite rt_hw_interrupt_disable/enable fuction
- * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
+ * 2010-04-20 fify move peripheral ISR to bsp/interrupts.s34
*
* For : Renesas M16C
* Toolchain : IAR's EW for M16C v3.401
@@ -39,19 +39,19 @@ rt_hw_interrupt_disable:
rt_hw_interrupt_enable:
LDC R0, FLG ;fify 20100419
RTS
-
+
.EVEN
os_context_switch:
PUSHM R0,R1,R2,R3,A0,A1,SB,FB
-
+
MOV.W rt_interrupt_from_thread, A0
STC ISP, [A0]
MOV.W rt_interrupt_to_thread, A0
LDC [A0], ISP
POPM R0,R1,R2,R3,A0,A1,SB,FB ; Restore registers from the new task's stack
- REIT ; Return from interrup
-
+ REIT ; Return from interrup
+
/*
* void rt_hw_context_switch_to(rt_uint32 to);
* r0 --> to