aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/ports/GCC/SIMIA32/chcore.c34
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");
}