diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-17 14:44:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-17 14:44:21 +0000 |
commit | e6ee866d8a37842faa3e9a99e3c3b4935ba28bf0 (patch) | |
tree | dc82d66d299eaca6b4c3166ccc2e0d986cdabcd1 /ports | |
parent | 4e914e72d86c226b8d9674cb05675d549bee89e8 (diff) | |
download | ChibiOS-e6ee866d8a37842faa3e9a99e3c3b4935ba28bf0.tar.gz ChibiOS-e6ee866d8a37842faa3e9a99e3c3b4935ba28bf0.tar.bz2 ChibiOS-e6ee866d8a37842faa3e9a99e3c3b4935ba28bf0.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@268 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARMCM3/chcore.c | 2 | ||||
-rw-r--r-- | ports/ARMCM3/chcore.h | 16 | ||||
-rw-r--r-- | ports/ARMCM3/crt0.s | 9 |
3 files changed, 14 insertions, 13 deletions
diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c index c5424848e..bf0cdc0d9 100644 --- a/ports/ARMCM3/chcore.c +++ b/ports/ARMCM3/chcore.c @@ -128,7 +128,7 @@ void PendSVVector(void) { }
asm volatile ("pop {lr} \n\t" \
- "mov r3, #0 \n\t" \
+ "movs r3, #0 \n\t" \
"mrs %0, PSP" : "=r" (sp_thd) : );
#ifdef CH_CURRP_REGISTER_CACHE
asm volatile ("stmdb %0!, {r3-r6,r8-r11, lr}" :
diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index e9fc693e0..6c80fdc09 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -78,16 +78,16 @@ typedef struct { }
#define chSysLock() { \
- asm volatile ("push {r12}"); \
- asm volatile ("mov r12, #0x10"); \
- asm volatile ("msr BASEPRI, r12"); \
- asm volatile ("pop {r12}"); \
+ asm volatile ("push {r3}"); \
+ asm volatile ("movs r3, #0x10"); \
+ asm volatile ("msr BASEPRI, r3"); \
+ asm volatile ("pop {r3}"); \
}
#define chSysUnlock() { \
- asm volatile ("push {r12}"); \
- asm volatile ("mov r12, #0"); \
- asm volatile ("msr BASEPRI, r12"); \
- asm volatile ("pop {r12}"); \
+ asm volatile ("push {r3}"); \
+ asm volatile ("movs r3, #0"); \
+ asm volatile ("msr BASEPRI, r3"); \
+ asm volatile ("pop {r3}"); \
}
#define INT_REQUIRED_STACK 0
diff --git a/ports/ARMCM3/crt0.s b/ports/ARMCM3/crt0.s index bd0b8b1a5..2f2ef7eea 100644 --- a/ports/ARMCM3/crt0.s +++ b/ports/ARMCM3/crt0.s @@ -63,7 +63,7 @@ dloop: * BSS initialization.
* NOTE: It assumes that the BSS size is a multiple of 4.
*/
- mov r0, #0
+ movs r0, #0
ldr r1, =_bss_start
ldr r2, =_bss_end
bloop:
@@ -74,9 +74,10 @@ bloop: /*
* Switches to the Process Stack and disables the interrupts globally.
*/
- mov r0, #CONTROL_MODE_PRIVILEGED | CONTROL_USE_PSP
+ movs r0, #CONTROL_MODE_PRIVILEGED | CONTROL_USE_PSP
msr CONTROL, r0
- mov r0, #0x10
+ isb
+ movs r0, #0x10
msr BASEPRI, r0
cpsie i
/*
@@ -86,7 +87,7 @@ bloop: /*
* main(0, NULL).
*/
- mov r0, #0
+ movs r0, #0
mov r1, r0
bl main
bl chSysHalt
|