aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/translate.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-05 18:12:08 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-05 18:12:08 +0000
commit9143e59842952d89533937dba9043b7b36b76a82 (patch)
tree73e0c11a2ff9c0b899a7d7665c35dcfddf4b9e0a /target-sparc/translate.c
parenta4d17f1992cd04bb4c1c65e239e6921b66363fc3 (diff)
Fix stdfq op (Aurelien Jarno)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2604 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/translate.c')
-rw-r--r--target-sparc/translate.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 53a3a674c6..cb11b928f6 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -2602,8 +2602,14 @@ static void disas_sparc_insn(DisasContext * dc)
gen_op_stfsr();
gen_op_ldst(stf);
break;
+#if !defined(CONFIG_USER_ONLY)
case 0x26: /* stdfq */
- goto nfpu_insn;
+ if (!supervisor(dc))
+ goto priv_insn;
+ if (gen_trap_ifnofpu(dc))
+ goto jmp_insn;
+ goto nfq_insn;
+#endif
case 0x27:
gen_op_load_fpr_DT0(DFPREG(rd));
gen_op_ldst(stdf);
@@ -2675,6 +2681,13 @@ static void disas_sparc_insn(DisasContext * dc)
gen_op_fpexception_im(FSR_FTT_UNIMPFPOP);
dc->is_br = 1;
return;
+#if !defined(CONFIG_USER_ONLY)
+ nfq_insn:
+ save_state(dc);
+ gen_op_fpexception_im(FSR_FTT_SEQ_ERROR);
+ dc->is_br = 1;
+ return;
+#endif
#ifndef TARGET_SPARC64
ncp_insn:
save_state(dc);