From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIQy-0001C4-8R for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhIQw-0002tZ-NG for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:16 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:50651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIQw-0002t2-8y for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:42:14 -0400 Received: by mail-iy0-f173.google.com with SMTP id 3so56035iyb.4 for ; Thu, 14 Jul 2011 02:42:14 -0700 (PDT) From: Tsuneo Saito Date: Thu, 14 Jul 2011 18:41:37 +0900 Message-Id: <1310636503-8956-3-git-send-email-tsnsaito@gmail.com> In-Reply-To: <1310636503-8956-1-git-send-email-tsnsaito@gmail.com> References: <1310636503-8956-1-git-send-email-tsnsaito@gmail.com> Subject: [Qemu-devel] [PATCH v2 2/8] 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 | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index f32a674..1e7e68d 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4484,10 +4484,16 @@ 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 +4501,9 @@ 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