aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/PPC/chcore.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-14 09:13:21 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-14 09:13:21 +0000
commit075b89133ec371480bdcf670d3f412b1cf131b0e (patch)
tree886089b9e7d4c6715a0cb2e14ea0de271b83cce4 /os/ports/GCC/PPC/chcore.c
parentf1bb1a01ca40b8c999346c701450fcf0ca74827a (diff)
downloadChibiOS-075b89133ec371480bdcf670d3f412b1cf131b0e.tar.gz
ChibiOS-075b89133ec371480bdcf670d3f412b1cf131b0e.tar.bz2
ChibiOS-075b89133ec371480bdcf670d3f412b1cf131b0e.zip
Performance optimization (not complete yet).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1739 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/PPC/chcore.c')
-rw-r--r--os/ports/GCC/PPC/chcore.c8
1 files changed, 4 insertions, 4 deletions
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 <b>directly</b> 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. */