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
This commit is contained in:
gdisirio 2009-04-09 19:00:13 +00:00
parent 7a549dd9d2
commit a0bcde3d36
4 changed files with 17 additions and 13 deletions

View File

@ -98,20 +98,21 @@ void ChkIntSources(void) {
* @param otp the thread to be switched out * @param otp the thread to be switched out
* @param ntp the thread to be switched in * @param ntp the thread to be switched in
*/ */
__attribute__((fastcall)) __attribute__((used))
void port_switch(Thread *otp, Thread *ntp) { static void __dummy(Thread *otp, Thread *ntp) {
register struct intctx volatile *esp asm("esp"); asm volatile (".globl @port_switch@8 \n\t" \
"@port_switch@8: \n\t" \
asm volatile ("push %ebp \n\t" \ "push %ebp \n\t" \
"push %esi \n\t" \ "push %esi \n\t" \
"push %edi \n\t" \ "push %edi \n\t" \
"push %ebx"); "push %ebx \n\t" \
otp->p_ctx.esp = esp; "movl %esp, 16(%ecx) \n\t" \
esp = ntp->p_ctx.esp; "movl 16(%edx), %esp \n\t" \
asm volatile ("pop %ebx \n\t" \ "pop %ebx \n\t" \
"pop %edi \n\t" \ "pop %edi \n\t" \
"pop %esi \n\t" \ "pop %esi \n\t" \
"pop %ebp"); "pop %ebp \n\t" \
"ret");
} }
/** /**

View File

@ -31,7 +31,7 @@ PROJECT_NAME = ChibiOS/RT
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # 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) # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put. # base path where the generated documentation will be put.

View File

@ -60,6 +60,9 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
*** Releases *** *** Releases ***
***************************************************************************** *****************************************************************************
*** 1.2.1 ***
- FIX: Fixed regression in MinGW demo (bug 2745153).
*** 1.2.0 *** *** 1.2.0 ***
- Full test cycle and test reports updated. - Full test cycle and test reports updated.
- NEW: Better separation between the port code and the system APIs, now an - NEW: Better separation between the port code and the system APIs, now an

View File

@ -35,7 +35,7 @@
/** /**
* Kernel version string. * Kernel version string.
*/ */
#define CH_KERNEL_VERSION "1.2.0" #define CH_KERNEL_VERSION "1.2.1"
/** /**
* Kernel version major number. * Kernel version major number.
@ -50,7 +50,7 @@
/** /**
* Kernel version patch number. * Kernel version patch number.
*/ */
#define CH_KERNEL_PATCH 0 #define CH_KERNEL_PATCH 1
/* /*
* Common values. * Common values.