From 075b89133ec371480bdcf670d3f412b1cf131b0e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 14 Mar 2010 09:13:21 +0000 Subject: Performance optimization (not complete yet). git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1739 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/PPC/chcore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'os/ports/GCC/PPC/chcore.c') diff --git a/os/ports/GCC/PPC/chcore.c b/os/ports/GCC/PPC/chcore.c index e0be71e3a..c09d353ad 100644 --- a/os/ports/GCC/PPC/chcore.c +++ b/os/ports/GCC/PPC/chcore.c @@ -48,10 +48,10 @@ void port_halt(void) { * @note The implementation of this code affects directly the context * switch performance so optimize here as much as you can. * - * @param[in] otp the thread to be switched out * @param[in] ntp the thread to be switched in + * @param[in] otp the thread to be switched out */ -void port_switch(Thread *otp, Thread *ntp) { +void port_switch(Thread *ntp, Thread *otp) { (void)otp; (void)ntp; @@ -63,8 +63,8 @@ void port_switch(Thread *otp, Thread *ntp) { asm ("stw %r0, 0(%sp)"); /* CR. */ asm ("stmw %r14, 4(%sp)"); /* GPR14...GPR31. */ - asm ("stw %sp, 12(%r3)"); /* Store swapped-out stack. */ - asm ("lwz %sp, 12(%r4)"); /* Load swapped-in stack. */ + asm ("stw %sp, 12(%r4)"); /* Store swapped-out stack. */ + asm ("lwz %sp, 12(%r3)"); /* Load swapped-in stack. */ asm ("lmw %r14, 4(%sp)"); /* GPR14...GPR31. */ asm ("lwz %r0, 0(%sp)"); /* CR. */ -- cgit v1.2.3