From a0bcde3d3626a6f306a13eec9ef6ef4dfae0319b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 9 Apr 2009 19:00:13 +0000 Subject: [PATCH] Fixed bug 2745153. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_1.2.x@885 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/chcore.c | 21 +++++++++++---------- docs/Doxyfile | 2 +- readme.txt | 3 +++ src/include/ch.h | 4 ++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/demos/Win32-MinGW/chcore.c b/demos/Win32-MinGW/chcore.c index a2194336c..081a02753 100644 --- a/demos/Win32-MinGW/chcore.c +++ b/demos/Win32-MinGW/chcore.c @@ -98,20 +98,21 @@ void ChkIntSources(void) { * @param otp the thread to be switched out * @param ntp the thread to be switched in */ -__attribute__((fastcall)) -void port_switch(Thread *otp, Thread *ntp) { - register struct intctx volatile *esp asm("esp"); - - asm volatile ("push %ebp \n\t" \ +__attribute__((used)) +static void __dummy(Thread *otp, Thread *ntp) { + asm volatile (".globl @port_switch@8 \n\t" \ + "@port_switch@8: \n\t" \ + "push %ebp \n\t" \ "push %esi \n\t" \ "push %edi \n\t" \ - "push %ebx"); - otp->p_ctx.esp = esp; - esp = ntp->p_ctx.esp; - asm volatile ("pop %ebx \n\t" \ + "push %ebx \n\t" \ + "movl %esp, 16(%ecx) \n\t" \ + "movl 16(%edx), %esp \n\t" \ + "pop %ebx \n\t" \ "pop %edi \n\t" \ "pop %esi \n\t" \ - "pop %ebp"); + "pop %ebp \n\t" \ + "ret"); } /** diff --git a/docs/Doxyfile b/docs/Doxyfile index 482fae3d9..2748c359c 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.2.0 +PROJECT_NUMBER = 1.2.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/readme.txt b/readme.txt index b4b7df154..1594f18dd 100644 --- a/readme.txt +++ b/readme.txt @@ -60,6 +60,9 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** Releases *** ***************************************************************************** +*** 1.2.1 *** +- FIX: Fixed regression in MinGW demo (bug 2745153). + *** 1.2.0 *** - Full test cycle and test reports updated. - NEW: Better separation between the port code and the system APIs, now an diff --git a/src/include/ch.h b/src/include/ch.h index 94dcf8fa0..fd8a8b61c 100644 --- a/src/include/ch.h +++ b/src/include/ch.h @@ -35,7 +35,7 @@ /** * Kernel version string. */ -#define CH_KERNEL_VERSION "1.2.0" +#define CH_KERNEL_VERSION "1.2.1" /** * Kernel version major number. @@ -50,7 +50,7 @@ /** * Kernel version patch number. */ -#define CH_KERNEL_PATCH 0 +#define CH_KERNEL_PATCH 1 /* * Common values.