Fixed bug 2745153.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@882 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
3a5cb07fb9
commit
a8a6649caa
|
@ -77,7 +77,7 @@ ULIBDIR =
|
||||||
ULIBS =
|
ULIBS =
|
||||||
|
|
||||||
# Define optimisation level here
|
# Define optimisation level here
|
||||||
OPT = -ggdb -O2 -fomit-frame-pointer
|
OPT = -ggdb -O0 -fomit-frame-pointer
|
||||||
|
|
||||||
#
|
#
|
||||||
# End of user defines
|
# End of user defines
|
||||||
|
@ -93,7 +93,7 @@ LIBS = $(DLIBS) $(ULIBS)
|
||||||
|
|
||||||
LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
|
||||||
ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
|
||||||
CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=$(<:.c=.lst) $(DEFS)
|
CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-alms=$(<:.c=.lst) $(DEFS)
|
||||||
|
|
||||||
# Generate dependency information
|
# Generate dependency information
|
||||||
CPFLAGS += -MD -MP -MF .dep/$(@F).d
|
CPFLAGS += -MD -MP -MF .dep/$(@F).d
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue