From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqAg-00018b-Lf for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgqAf-0004JE-Bb for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:34 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:40085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqAf-0004D1-1C for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:33 -0400 Received: by mail-iy0-f173.google.com with SMTP id 3so5910382iyb.4 for ; Tue, 12 Jul 2011 20:31:32 -0700 (PDT) From: Tsuneo Saito Date: Wed, 13 Jul 2011 12:30:47 +0900 Message-Id: <1310527849-784-3-git-send-email-tsnsaito@gmail.com> In-Reply-To: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> References: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> Subject: [Qemu-devel] [PATCH 2/4] SPARC64: fp_disabled checks on ldfa/lddfa/ldqfa List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Tsuneo Saito ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptions if %pstate.PEF==0 or %fprs.FEF==0. Signed-off-by: Tsuneo Saito --- target-sparc/translate.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index f32a674..d07eb25 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4484,10 +4484,14 @@ static void disas_sparc_insn(DisasContext * dc) case 0x2d: /* V9 prefetch, no effect */ goto skip_move; case 0x30: /* V9 ldfa */ + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; save_state(dc, cpu_cond); gen_ldf_asi(cpu_addr, insn, 4, rd); goto skip_move; case 0x33: /* V9 lddfa */ + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; save_state(dc, cpu_cond); gen_ldf_asi(cpu_addr, insn, 8, DFPREG(rd)); goto skip_move; @@ -4495,6 +4499,8 @@ static void disas_sparc_insn(DisasContext * dc) goto skip_move; case 0x32: /* V9 ldqfa */ CHECK_FPU_FEATURE(dc, FLOAT128); + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; save_state(dc, cpu_cond); gen_ldf_asi(cpu_addr, insn, 16, QFPREG(rd)); goto skip_move; -- 1.7.5.4