diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-30 09:40:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-30 09:40:21 +0000 |
commit | 5d374c633e69ae84bc8e02fc3bb3d0cbeded201e (patch) | |
tree | 7d53420ff5256a88a0ed4ed644ea924664a7e312 /os/ports | |
parent | 5ce36d57c90b68b058b7eee4306d6a4893b49562 (diff) | |
download | ChibiOS-5d374c633e69ae84bc8e02fc3bb3d0cbeded201e.tar.gz ChibiOS-5d374c633e69ae84bc8e02fc3bb3d0cbeded201e.tar.bz2 ChibiOS-5d374c633e69ae84bc8e02fc3bb3d0cbeded201e.zip |
Fixed bug 3522301.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4151 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports')
-rw-r--r-- | os/ports/GCC/SIMIA32/chcore.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/os/ports/GCC/SIMIA32/chcore.c b/os/ports/GCC/SIMIA32/chcore.c index 2850882df..dadf44291 100644 --- a/os/ports/GCC/SIMIA32/chcore.c +++ b/os/ports/GCC/SIMIA32/chcore.c @@ -36,26 +36,28 @@ __attribute__((used))
static void __dummy(Thread *ntp, Thread *otp) {
(void)ntp; (void)otp;
+
+ asm volatile (
#if defined(WIN32)
- asm volatile (".globl @port_switch@8 \n\t" \
- "@port_switch@8:");
+ ".globl @port_switch@8 \n\t"
+ "@port_switch@8:"
#elif defined(__APPLE__)
- asm volatile (".globl _port_switch \n\t" \
- "_port_switch:");
+ ".globl _port_switch \n\t"
+ "_port_switch:"
#else
- asm volatile (".globl port_switch \n\t" \
- "port_switch:");
+ ".globl port_switch \n\t"
+ "port_switch:"
#endif
- asm volatile ("push %ebp \n\t" \
- "push %esi \n\t" \
- "push %edi \n\t" \
- "push %ebx \n\t" \
- "movl %esp, 12(%edx) \n\t" \
- "movl 12(%ecx), %esp \n\t" \
- "pop %ebx \n\t" \
- "pop %edi \n\t" \
- "pop %esi \n\t" \
- "pop %ebp \n\t" \
+ "push %ebp \n\t"
+ "push %esi \n\t"
+ "push %edi \n\t"
+ "push %ebx \n\t"
+ "movl %esp, 12(%edx) \n\t"
+ "movl 12(%ecx), %esp \n\t"
+ "pop %ebx \n\t"
+ "pop %edi \n\t"
+ "pop %esi \n\t"
+ "pop %ebp \n\t"
"ret");
}
|