From 971eaba9e11ef23a87b5bdc64360b99f590776f6 Mon Sep 17 00:00:00 2001
From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Date: Tue, 20 Sep 2016 10:37:03 +0200
Subject: [PATCH] patmos: restructure context_switch for platin

---
 arch/patmos/tcb.cc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/patmos/tcb.cc b/arch/patmos/tcb.cc
index e5f0e30..da7d752 100644
--- a/arch/patmos/tcb.cc
+++ b/arch/patmos/tcb.cc
@@ -53,10 +53,8 @@ void context_load(const TCB *to) {
 	"mts $s8 = $r15       \n"
         "nop\n"
 	"sens $r12	     \n"
-	"ret                  \n"
-	"mts $s3 = $r11       \n"
+        "mts $s3 = $r11       \n"
 	"mts $s0 = $r9        \n"
- 	"nop"
         : : "r"(to->dynamic_context)
     );
 switch_context_load:
@@ -125,8 +123,6 @@ void context_save_and_load(const TCB * from, const TCB *to) {
 	"sens $r12	     \n"
         "mts $s3 = $r11       \n"
 	"mts $s0 = $r9        \n"
-	"retnd                \n"
-	"nop"
         : : "r" (from->dynamic_context), "r"(to->dynamic_context)
     );
 switch_context_save_and_load:
-- 
GitLab