From patchwork Fri Jul 7 02:21:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9829431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 10A77602F0 for ; Fri, 7 Jul 2017 02:40:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 016B520007 for ; Fri, 7 Jul 2017 02:40:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E856B284FC; Fri, 7 Jul 2017 02:40:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 92AC320007 for ; Fri, 7 Jul 2017 02:40:04 +0000 (UTC) Received: from localhost ([::1]:54177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTJBb-0007RT-R4 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 22:40:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTIxW-00044F-2x for qemu-devel@nongnu.org; Thu, 06 Jul 2017 22:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTIxV-0001af-9r for qemu-devel@nongnu.org; Thu, 06 Jul 2017 22:25:30 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTIxV-0001aV-5h for qemu-devel@nongnu.org; Thu, 06 Jul 2017 22:25:29 -0400 Received: by mail-qk0-x242.google.com with SMTP id p21so2762222qke.0 for ; Thu, 06 Jul 2017 19:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YQom9tkCzSCL9+YJa4a34BWwfhgCLnbjxZ+DnCP30iQ=; b=MsgAjAZc4EZ6csmtgAJQpRdf8ECn0agMXySi8asb6tbz47if1N39Sc+M+pcjiyNskt bV7OLQnzhpfvKNq72yYilKUCiqJDWLLWpbLQDAh103E/nj4uALgXAd5QL4t8KMg3W8Cl 6paDVN01w2jdHTx5NngbRUYNBRfT37DjD7uxlcO4sRemJ+0ZmkDoRa/ah/B0bgSXMqjE ua2F/KN/k2kn8T0whyll4GXT4rsK4ghCe/TIGw/OHC2LUw4rIwI3OUI6KPBDJTV1fKUI 7Z3e5N+7jEH+MrlMGcI+fUv1OR8XDH76dqKcNfTVvUmGT8nxNo/6ja8RzT11Y9K3c5Wp qrZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=YQom9tkCzSCL9+YJa4a34BWwfhgCLnbjxZ+DnCP30iQ=; b=YaLqLyAxdH9q30SPYsLPr+s62hOayp23dysdlreIvALZ6UowxSEVFDWB7hUOuq8Fts KI/OvS2SY7y0W9deOg/RpoqFKpQQqJexB0mlM+WgzAlyw0hScKgHic9VHDkZN2cMp0F9 lz8QpIcfgKGqiNZOpQuGDK6VIMv5NT2cXJS4qCCJCfWIlT9ZKaomu2hOmxbOSDM+nJfu 5VclBuDga7sxBi0GW3vCnjVrWsAsrntDw97t+zETYT77F9x3te1CpOnJiYalbpWYw0SF zIDZVmIidZzYRe7vJxTTqz/BuF3ugaOmqKumPhXV1SkuWMFwI6XbefnLx7iUy03Og7Tv HBhQ== X-Gm-Message-State: AKS2vOzaROa7jHD7C2zLvZQbfb+6AICjJlviOtMAAr4MwJcPA2dsOkQc CpOQqlqyn4IEqU9LngM= X-Received: by 10.55.221.220 with SMTP id u89mr61301680qku.236.1499394328546; Thu, 06 Jul 2017 19:25:28 -0700 (PDT) Received: from bigtime.twiddle.net.com (rrcs-66-91-136-156.west.biz.rr.com. [66.91.136.156]) by smtp.gmail.com with ESMTPSA id i85sm1407176qke.66.2017.07.06.19.25.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 19:25:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 16:21:09 -1000 Message-Id: <20170707022111.21836-26-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170707022111.21836-1-rth@twiddle.net> References: <20170707022111.21836-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v2 25/27] target/sh4: Add missing FPSCR.PR == 0 checks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bruno@clisp.org, laurent@vivier.eu, aurelien@aurel32.net, glaubitz@debian.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Both frchg and fschg require PR == 0, otherwise undefined_operation. Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- target/sh4/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 35a5c91..2b62e39 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -485,10 +485,12 @@ static void _decode_opc(DisasContext * ctx) tcg_gen_movi_i32(cpu_sr_t, 1); return; case 0xfbfd: /* frchg */ + CHECK_FPSCR_PR_0 tcg_gen_xori_i32(cpu_fpscr, cpu_fpscr, FPSCR_FR); ctx->bstate = BS_STOP; return; case 0xf3fd: /* fschg */ + CHECK_FPSCR_PR_0 tcg_gen_xori_i32(cpu_fpscr, cpu_fpscr, FPSCR_SZ); ctx->bstate = BS_STOP; return;