From patchwork Wed Jul 13 03:30:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsuneo Saito X-Patchwork-Id: 104474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0851F1007D1 for ; Wed, 13 Jul 2011 13:44:10 +1000 (EST) Received: from localhost ([::1]:35041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqMo-0003JG-TK for incoming@patchwork.ozlabs.org; Tue, 12 Jul 2011 23:44:07 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgqAq-0001BN-9a for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgqAo-0004Zv-Qr for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:44 -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 1QgqAo-0004D1-AB for qemu-devel@nongnu.org; Tue, 12 Jul 2011 23:31:42 -0400 Received: by mail-iy0-f173.google.com with SMTP id 3so5910382iyb.4 for ; Tue, 12 Jul 2011 20:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=6goNxj07e9qKjZ12QUKD7BXEqgfQVfWjJ8npkgX4VmA=; b=nJ/pBwgxZm+aXRyhRhbeX0fF6JonLvfjeRe82dDbdh5HHvnj8Nt3EQ8E8xssSZ8nuS BLwC5utq/KZAjRNUjL/Au9V1jbY52PidAL2KbDE+sTztZut93SFmxW6RFL3g4W57ygsl Tefq1cWxqIfKxI0gBzIJHGCeVnkHkhI2vQVMI= Received: by 10.42.223.2 with SMTP id ii2mr571599icb.423.1310527901990; Tue, 12 Jul 2011 20:31:41 -0700 (PDT) Received: from localhost.localdomain (tetkyo149119.tkyo.te.ftth2.ppp.infoweb.ne.jp [202.219.195.119]) by mx.google.com with ESMTPS id hp8sm15541550icc.11.2011.07.12.20.31.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jul 2011 20:31:41 -0700 (PDT) From: Tsuneo Saito To: qemu-devel@nongnu.org Date: Wed, 13 Jul 2011 12:30:49 +0900 Message-Id: <1310527849-784-5-git-send-email-tsnsaito@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> References: <1310527849-784-1-git-send-email-tsnsaito@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.173 Cc: Tsuneo Saito Subject: [Qemu-devel] [PATCH 4/4] SPARC64: fp_disabled checks on stfa/stdfa/stqfa X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org stfa/stdfa/stqfa 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 95e78a3..94c1000 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4729,6 +4729,8 @@ static void disas_sparc_insn(DisasContext * dc) switch (xop) { #ifdef TARGET_SPARC64 case 0x34: /* V9 stfa */ + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; gen_stf_asi(cpu_addr, insn, 4, rd); break; case 0x36: /* V9 stqfa */ @@ -4736,6 +4738,8 @@ static void disas_sparc_insn(DisasContext * dc) TCGv_i32 r_const; CHECK_FPU_FEATURE(dc, FLOAT128); + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; r_const = tcg_const_i32(7); gen_helper_check_align(cpu_addr, r_const); tcg_temp_free_i32(r_const); @@ -4743,6 +4747,8 @@ static void disas_sparc_insn(DisasContext * dc) } break; case 0x37: /* V9 stdfa */ + if (gen_trap_ifnofpu(dc, cpu_cond)) + goto jmp_insn; gen_stf_asi(cpu_addr, insn, 8, DFPREG(rd)); break; case 0x3c: /* V9 casa */