summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ungerer2015-06-19 15:43:25 +0200
committerPeter Maydell2015-06-22 15:43:25 +0200
commit2a8327e8a8288e301a2f01bc3ca2d465a3a4ca78 (patch)
tree8346d2dfa2e4654286cebcb9559a2b3ff5a7b945
parentm68k: implement more ColdFire 5208 interrupt controller functionality (diff)
downloadqemu-2a8327e8a8288e301a2f01bc3ca2d465a3a4ca78.tar.gz
qemu-2a8327e8a8288e301a2f01bc3ca2d465a3a4ca78.tar.xz
qemu-2a8327e8a8288e301a2f01bc3ca2d465a3a4ca78.zip
m68k: implement move to/from usp register instruction
Fill out the code support for the move to/from usp instructions. They are being decoded, but there is no code to support there actions. So add it. Current versions of Linux running on the ColdFire 5208 use these instructions. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Tested-by: Laurent Vivier <laurent@vivier.eu> Message-id: 1434721406-25288-3-git-send-email-gerg@uclinux.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target-m68k/translate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 4959b970ea..96d75bf956 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1995,8 +1995,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)
@@ -2005,8 +2005,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)