diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-02-25 16:29:25 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-02-25 16:29:25 +0000 |
commit | a40f3424bd4c24f28f43746af79eafdc3faf76ce (patch) | |
tree | 2ad473287753337ae12ffb96020cfefb60d4e1b6 /ports | |
parent | ef79349ec13b036003e78c8b7585f9b4808efa63 (diff) | |
download | ChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.tar.gz ChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.tar.bz2 ChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@205 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARM7/chcore.h | 8 | ||||
-rw-r--r-- | ports/ARM7/chsys.s | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 2917428f3..d03d6aaba 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -94,6 +94,8 @@ extern void chSysUnlock(void); #define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
#ifdef THUMB
+#define chSysSwitchI chSysSwitchI_thumb
+
#define chSysIRQEnterI() { \
asm(".code 32 \n\t" \
"stmfd sp!, {r0-r3, r12, lr} \n\t" \
@@ -107,6 +109,8 @@ extern void chSysUnlock(void); "bx r0 \n\t"); \
}
#else /* !THUMB */
+#define chSysSwitchI chSysSwitchI_arm
+
#define chSysIRQEnterI() { \
asm("stmfd sp!, {r0-r3, r12, lr} \n\t"); \
}
@@ -116,10 +120,6 @@ extern void chSysUnlock(void); }
#endif /* !THUMB */
-#ifdef THUMB
-#define chSysSwitchI chSysSwitchI_thumb
-#endif /* THUMB */
-
/* It requires zero bytes, but better be safe.*/
#define IDLE_THREAD_STACK_SIZE 8
void _IdleThread(void *p) __attribute__((noreturn));
diff --git a/ports/ARM7/chsys.s b/ports/ARM7/chsys.s index 770edaaec..d1de7d100 100644 --- a/ports/ARM7/chsys.s +++ b/ports/ARM7/chsys.s @@ -75,8 +75,8 @@ chSysSwitchI_thumb: // Jumps into chSysSwitchI in ARM mode
#endif
.code 32
-.global chSysSwitchI
-chSysSwitchI:
+.global chSysSwitchI_arm
+chSysSwitchI_arm:
#ifdef CH_CURRP_REGISTER_CACHE
stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr}
str sp, [r0, #16]
@@ -112,8 +112,8 @@ chSysSwitchI: * | R2 | | External context: IRQ handler frame
* | R1 | |
* | R0 | |
- * | LR_IRQ | | (user code return address)
- * | SPSR | -+ (user code status)
+ * | PC | | (user code return address)
+ * | PSR_USR | -+ (user code status)
* | .... | <- mk_DoRescheduleI() stack frame, optimize it for space
* | LR | -+ (system code return address)
* | R11 | |
|