Skip to contentSkip to conversation

m68k: implement move to/from usp register instruction

PATCH In review [email protected] 2 participants 2 messages Sep 13, 2012 – Sep 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 m68k: implement move to/from usp register instruction

From: Greg Ungerer <[email protected]>

Fill out the code support for the move to/from usp instructions. They are being decoded, but there is no code to support their actions. So add it.

Current versions of Linux running on the ColdFire 5208 use these instructions.

---
 target-m68k/translate.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
target-m68k/translate.c +4 -4
index 9fc1e31..7b55747 100644
@@ -1980,8 +1980,8 @@ DISAS_INSN(move_from_usp)
         gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
         return;
     }
-    /* TODO: Implement USP.  */
-    gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+    tcg_gen_ld_i32(AREG(insn, 0), cpu_env,
+                   offsetof(CPUM68KState, sp[M68K_USP]));
 }
 
 DISAS_INSN(move_to_usp)
@@ -1990,8 +1990,8 @@ DISAS_INSN(move_to_usp)
         gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
         return;
     }
-    /* TODO: Implement USP.  */
-    gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+    tcg_gen_st_i32(AREG(insn, 0), cpu_env,
+                   offsetof(CPUM68KState, sp[M68K_USP]));
 }
 
 DISAS_INSN(halt)
Signature · 1 line
1.7.0.4
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · On 09/13/2012 04:37 PM, [email protected] wrote:

From: Greg Ungerer <[email protected]>

Fill out the code support for the move to/from usp instructions. They are being decoded, but there is no code to support their actions. So add it.

Current versions of Linux running on the ColdFire 5208 use these instructions.

r~