aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2010-06-02 00:12:37 +0400
committerBlue Swirl <blauwirbel@gmail.com>2010-06-02 20:05:30 +0000
commitfe987e2394e1fca01aba581095f219423fbbdd39 (patch)
tree7b6ece9926db8318817249a8cefa96523d790da2 /target-sparc
parentc086b783eb7a578993d6d2ab62c4c2666800b63d (diff)
downloadqemu-fe987e2394e1fca01aba581095f219423fbbdd39.zip
qemu-fe987e2394e1fca01aba581095f219423fbbdd39.tar.gz
qemu-fe987e2394e1fca01aba581095f219423fbbdd39.tar.bz2
sparc64: fix ldxfsr insn
- rearrange code to break from switch when appropriate - allow deprecated ldfsr insn Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/translate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index eff64d4..0bc1a82 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -4476,7 +4476,11 @@ static void disas_sparc_insn(DisasContext * dc)
if (rd == 1) {
tcg_gen_qemu_ld64(cpu_tmp64, cpu_addr, dc->mem_idx);
gen_helper_ldxfsr(cpu_tmp64);
- } else
+ } else {
+ tcg_gen_qemu_ld32u(cpu_tmp0, cpu_addr, dc->mem_idx);
+ tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_tmp0);
+ gen_helper_ldfsr(cpu_tmp32);
+ }
#else
{
tcg_gen_qemu_ld32u(cpu_tmp32, cpu_addr, dc->mem_idx);