summaryrefslogtreecommitdiff
path: root/libcpu/m16c
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2022-01-25 18:53:52 +0800
committerWayne Lin <[email protected]>2022-01-25 18:53:52 +0800
commitc95c296e9915a38a666ae1a2575c2a4d0ba1d376 (patch)
treec6e5a1ffe4ceb997e853ba0c3daffc9dc60c8b79 /libcpu/m16c
parentf7ba146a01fcf23a2b06a141d1b1a56cb27b878c (diff)
parent32a5668593c578b85560338c29d76f3a252c8dbc (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton
# Conflicts: # bsp/gd32/gd32107c-eval/rtconfig.h
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