From patchwork Fri Aug 31 07:53:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10583235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51B555A4 for ; Fri, 31 Aug 2018 07:54:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4320229493 for ; Fri, 31 Aug 2018 07:54:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36F8D2B348; Fri, 31 Aug 2018 07:54:11 +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=-7.3 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,MAILING_LIST_MULTI, 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 2DF0C29493 for ; Fri, 31 Aug 2018 07:54:10 +0000 (UTC) Received: from localhost ([::1]:52340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fveFt-0007CK-07 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 31 Aug 2018 03:54:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fveF9-0006nz-OL for qemu-devel@nongnu.org; Fri, 31 Aug 2018 03:53:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fveF9-0003Qv-0P for qemu-devel@nongnu.org; Fri, 31 Aug 2018 03:53:23 -0400 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:41870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fveF8-0003Qj-PE; Fri, 31 Aug 2018 03:53:22 -0400 Received: by mail-lf1-x143.google.com with SMTP id l26-v6so9258889lfc.8; Fri, 31 Aug 2018 00:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jw/SGIoqh9LwwPmmknUBj4DcGSOHOarc9Ee6rDr3YF4=; b=GK3Sf7A0qNlEqdQVX8phWsl6gJC3kQTg7EZQcv92uTM8pPnxH8jY3Bke4spIyFLc/Y 5IfuPgkRNFusU7vxkcxa7Zhj+sNIrnl4Ho7nI8TlmRJ9jy8KVcjFGKasWY8YG975vF+t aG9NEpq+oU5doiVSiP7/F3TT9/Y8eIq8oZk0CXurItYoeY6jUBSDIAfQRA2pvfSSirFa 5+Xb0GcApfsXKx+y3RuadtJOk9nDAovvarzq8iSt1E9oGYHicqD7V3jqnQwCyV7gp9cl DLU57nLmj+a2YvLvNSZeVgAMvXl+gy/2w4bUyoE5n2aSWo5ZbyqzdBjBDfr1Ywbu1id3 8Drw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jw/SGIoqh9LwwPmmknUBj4DcGSOHOarc9Ee6rDr3YF4=; b=Hn5vFLm+rKCD2HQlhUN51ipIq7XM6KW6qVX8cLyTpYRsnNrj0BRcRhGhWAH3xUcPTt yMG6iMbWuaSAlHSsbdHgsG49TpFQx1Wdx3pAxf2+8LeLU4fOZrlJd0jbpvRORpik0Yzg NfEyPejKdV3nMqyIEjqyL1EUuYl8pf4H9xHtZahxj7qAqNXbHQEWSM2fSjSXgJNcWPwi 2QRFh+M4yilLY9e9HybqH0qhz+zezhAKZQL29eyCG+pb0Bq4H/VKD3gXt3mA8rDEGSVu PjQsrP8229ErTtNi0niwR8NiEaR6HXnUVv+psNwkfIJR1NPE6oar+IMOVK1OMCA7hUuH nXhg== X-Gm-Message-State: APzg51D5F2Nx5YTusJQgf7FjSsKVLvfKaS0a+ny9aOG0c+fqy++R0epd rpo5wZJuO/zd5wuQXWrLb9kwbFyo X-Google-Smtp-Source: ANB0VdZrandpV4dfhTqaYh3nr2pIooZ72WBEOODZIwat73B4iHtT+S/ZIfjoeuyC9ZHviEk9pMQS6g== X-Received: by 2002:a19:d808:: with SMTP id p8-v6mr3826840lfg.105.1535702001215; Fri, 31 Aug 2018 00:53:21 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id d10-v6sm1648813lfk.63.2018.08.31.00.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 00:53:20 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 31 Aug 2018 00:53:09 -0700 Message-Id: <20180831075309.22454-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::143 Subject: [Qemu-devel] [PATCH] target/xtensa: fix FPU2000 bugs 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: Max Filippov , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP - FPU2000 defines rfr and wfr opcodes, not rfr.s and wfr.s; - movcond.s uses incorrect operand in tcg_gen_movcond: in case the condition is not satisfied it must not change its argument 0. Fixes: c04e1692e3aa ("target/xtensa: extract FPU2000 opcode translators") Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov --- target/xtensa/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index d22cdcdb1634..25399058a0db 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -4706,7 +4706,7 @@ static void translate_movcond_s(DisasContext *dc, const uint32_t arg[], tcg_gen_movcond_i32(par[0], cpu_FR[arg[0]], cpu_R[arg[2]], zero, - cpu_FR[arg[1]], cpu_FR[arg[2]]); + cpu_FR[arg[1]], cpu_FR[arg[0]]); tcg_temp_free(zero); } } @@ -4867,7 +4867,7 @@ static const XtensaOpcodeOps fpu2000_ops[] = { .translate = translate_compare_s, .par = (const uint32_t[]){COMPARE_OLT}, }, { - .name = "rfr.s", + .name = "rfr", .translate = translate_rfr_s, }, { .name = "round.s", @@ -4921,7 +4921,7 @@ static const XtensaOpcodeOps fpu2000_ops[] = { .translate = translate_ftoi_s, .par = (const uint32_t[]){float_round_to_zero, true}, }, { - .name = "wfr.s", + .name = "wfr", .translate = translate_wfr_s, }, };