From 5d374c633e69ae84bc8e02fc3bb3d0cbeded201e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 30 Apr 2012 09:40:21 +0000 Subject: Fixed bug 3522301. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4151 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/SIMIA32/chcore.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'os') 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"); } -- cgit v1.2.3