From patchwork Tue Jun 9 16:28:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1ACB8138C for ; Tue, 9 Jun 2020 16:41:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E39F720737 for ; Tue, 9 Jun 2020 16:41:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hKd8inpM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E39F720737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihJf-00069r-1k for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:41:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7E-0005vr-Ql for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:44 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7C-00016m-Bj for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:44 -0400 Received: by mail-wr1-x431.google.com with SMTP id c3so21991831wru.12 for ; Tue, 09 Jun 2020 09:28:41 -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:in-reply-to:references; bh=Gyc4jAqqb4iRdL2lJtXMg0ZbvCkpCJJT7AmeHRVjQIU=; b=hKd8inpMobY7D1omGPcOVM9gONVV5VnVXqwIQa+X+IQe0VKzgtVvqVOvr15w2PudUP i+rrEKDhKPC1/j7i/W5XjDUNRHj/CGVBg1Wo4khpX+tCKva6hU/qVif/ydcSNfriLjdt RpAACZZmsJQhNjQpvT3/2rV7mmDf43DBg+YgRRI5XM2OYYfTDop37pYJ00gPCIswNMzn s2HQ9q86VOxdMwwywDOUKLtBJ27vIn3MpqrDLvjvpGgIUbGP3EyZLkVxm0WJTNkf+x9a gEWlV5yjNeQKnuE7Ub6egiHgDXEO6ifiYmtB88J59LgvQ2htDiy3kDmeJl7NOxyn2Iea UXig== 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:in-reply-to :references; bh=Gyc4jAqqb4iRdL2lJtXMg0ZbvCkpCJJT7AmeHRVjQIU=; b=oiPi/FOdfoRDzYrGzHULA/3QuIUCMoQlFOjuRjfvWo0GTGBa/VzHjCpm1tmdA3TZJ8 2KW4XuwiPOYlL5vwAvQ/55Lgpb/8GJEjnrs9dz1jgf7NZxiYuREtLsAMCKZVfOGNXDup pCcoflo1Q9qTE1DWv15u7m+yIMbmlkpQTleRE4VFOhI66V2ifqUBhzaux+jVci3EpegX Dp4hbqPxu0KEE7hnu5pwloACvNJN5R+LH0rIY0YgyueNtLmeGrkZZrqmHvfRyWw/eRsD 58z2fIKpsJk8kb6bHVQXY0ZDsDpQPUmFrzY9zDfLNZxvEpMGFHKszPOHDM/TBVFRug1Y +LMg== X-Gm-Message-State: AOAM533c053l+qEmZIueLvRLkW0842lNDxMcDmCIsyQlxPdocAS8HDsr ZInddHpELFE+BcySoxX1Z8Kyz8f/ X-Google-Smtp-Source: ABdhPJwgvP9rapt/B6tE2xqR9Sh4o/A1PNBh869Q3npXC1BwRsrmf2LHgRTieaTRpVRuESETX6INpw== X-Received: by 2002:a05:6000:87:: with SMTP id m7mr5469837wrx.306.1591720120424; Tue, 09 Jun 2020 09:28:40 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:39 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 01/20] mailmap: Change email address of Filip Bozuta Date: Tue, 9 Jun 2020 18:28:19 +0200 Message-Id: <1591720118-7378-2-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Filip Bozuta wants to use his new email address for his future work in QEMU. CC: Filip Bozuta Signed-off-by: Aleksandar Markovic Reviewed-by: Filip Bozuta Message-Id: <20200602085215.12585-2-aleksandar.qemu.devel@gmail.com> --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index e3628c7..9f2a3a5 100644 --- a/.mailmap +++ b/.mailmap @@ -45,6 +45,7 @@ Aleksandar Markovic Aleksandar Rikalo Aleksandar Rikalo Anthony Liguori Anthony Liguori +Filip Bozuta James Hogan Leif Lindholm Paul Burton From patchwork Tue Jun 9 16:28:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B98B960D for ; Tue, 9 Jun 2020 16:34:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EFD620734 for ; Tue, 9 Jun 2020 16:34:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nWPDB9JU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EFD620734 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihD6-000542-Px for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7F-0005wR-2o for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:45 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7C-00016r-LM for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:44 -0400 Received: by mail-wr1-x42b.google.com with SMTP id t18so22032137wru.6 for ; Tue, 09 Jun 2020 09:28:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=vpjGR3SSo/dqO1sryzCVOBY48tat7koG6WnUT5kfYuU=; b=nWPDB9JU+nbTxbn4pF5AmPVsDUttMUjsBfIKqzfnLIB8zuEuo/nzb+yf8Wp8NHQo/J BQJ81QE1F7BJmLvIf2Wlu6ed3/tgPoGCTbaXv2nBcCZ1SvlE0Rw/HIR1IIw95WYoGf4t rrRhKy2ZX5rQWV3aTtoDnbIaSpI28qdyQj6R4Z9SM/ihnNklC+NYWW8oKhToHMWFPfqn rRLPRWKRhZQF8heAKp/+U0k6dUs2BAsvUHfIe0BJ4UNWA+91l24dM8OT8V9DJaXe7734 AnkH47FUGPGdFFgtAkbQJTZhFVHhnyo5QxpHwgH246yIwJG1C9smdtiwA9a/nNdUio9Q mZQA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=vpjGR3SSo/dqO1sryzCVOBY48tat7koG6WnUT5kfYuU=; b=aWbN78bc4MKpoYjAfhZu00nmiWbWx+dHTQHhwao0cz0nUzPMPzSdunLpIFy7NK8mj/ iDvfBi+XWAr+SPFg1CPXz1Y/R8HqGdYKPziJPe3esihyzLaRSiSCjhR6NLLvEfLRZO8L u7qW2I2x0CRvsVZEOX5ZzZcvz5TU6e6t/795sjgSPXbI3qrdM2n+K606xdaABHG2+cZe +0CZH9j6gxOO7jV2HEnwtk6abV7Zw2fuzS4iYKZWZzqhYMGpfGvCQX9hrMZ9mPUPQkYU 4hnUFprmQhzT/BvQZzQgQvHuOHBV0dcobWBrW9zXV5CORO9bKp6ATJ3ZWlfz4puq+G91 XWIQ== X-Gm-Message-State: AOAM531rZSM14wckgM4RwSG2zwnfyGyOBnar0NC5WDQFDKOIoKI+alBq R6NB9vUbM6y9u/nz+/QmSv/qjtQ4 X-Google-Smtp-Source: ABdhPJyS50Qy5oXcVIlU9JKUPXKJF5VZHhH3RGyv2x6BjdoPTHyf8423br6FTgScxEdButsPpx84kA== X-Received: by 2002:adf:d84c:: with SMTP id k12mr5341131wrl.265.1591720121137; Tue, 09 Jun 2020 09:28:41 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:40 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 02/20] mailmap: Change email address of Stefan Brankovic Date: Tue, 9 Jun 2020 18:28:20 +0200 Message-Id: <1591720118-7378-3-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Stefan Brankovic wants to use his new email address for his future work in QEMU. CC: Stefan Brankovic Signed-off-by: Aleksandar Markovic Reviewed-by: Stefan Brankovic Message-Id: <20200602085215.12585-3-aleksandar.qemu.devel@gmail.com> --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 9f2a3a5..84f3659 100644 --- a/.mailmap +++ b/.mailmap @@ -52,6 +52,7 @@ Paul Burton Paul Burton Paul Burton Philippe Mathieu-Daudé +Stefan Brankovic Yongbok Kim # Also list preferred name forms where people have changed their From patchwork Tue Jun 9 16:28:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D92560D for ; Tue, 9 Jun 2020 16:32:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5A6720774 for ; Tue, 9 Jun 2020 16:31:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rP9R+JOM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5A6720774 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihAN-0001Tm-06 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:31:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7E-0005v3-Fu for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:44 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7D-000171-CD for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:44 -0400 Received: by mail-wr1-x42c.google.com with SMTP id t18so22032167wru.6 for ; Tue, 09 Jun 2020 09:28:42 -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:in-reply-to:references; bh=GR4eimU9t63Pw1mCFxbwUNXUU4YvTN5YihjHWjA0XDI=; b=rP9R+JOM9hBsPI90mXZwxxnd1UTkAWwSs/sAPHPmvqu3uWrX67D8VlVICpvWufCA4b GXNCBg8Jk6SC4FbqLGhlaKhUCr1x2ULItpIIK/fUVYYnVr0fwsBZBqaq+JcdueD6gJqp t0yeA3M0cvMIJ2DEc79hcqf0kIm3ddW0ywhNYbR049ZmS19AMDlv+Gjylz+1G7KAvfMp TBxowUdTsTLV2Oj4Fd+082+3Ye1/nlC2zTLD1Af7R689kchqLOsUN8T96e7gTZ80DrgA +MlDQN3tK58kcwALNsNF3kzywqarBkwzmNBzvrEPmVQDh+rtOlaYdS6EXZeETovr92QL gluw== 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:in-reply-to :references; bh=GR4eimU9t63Pw1mCFxbwUNXUU4YvTN5YihjHWjA0XDI=; b=KKeNHtbePSKK7d1jyL7O6FJmxclzWz79soyjBA5B9MswWvr1nyINc0p6C1T19JEi38 9PNH9IIbO5R8hVpxg8iMdG6OU45bGp+jd6Pq5g8Io8lJWsrJ/n3BqTBUEftSoJNxihHy JFPvZaRy5Js9FBWCk74Mxg3IF0WAsLQ/IHX4+crstz7KSXen+2r5yZy105ZR/DGebkSf bMBSuBK6btJ6jRrgRr3YATMDUKI/2TS3ND92jFeJavkXU95Ino/WHWLZASYu/4ExcKPB WylSv8Emn1eIyQDE+o/J8OEZ/bWzIutyLvKTRE4yfE4nAruQSwjOWvpqXwA+7PLkwNeG jxYw== X-Gm-Message-State: AOAM533LSGN0+tVd6vxd1xbdYMvwETPZB5qkUMAz+1I1hTx0TjTwFja/ +qu5ywcA+8QNw6vhwUyZpS9l4rGN X-Google-Smtp-Source: ABdhPJwqzHiJJnj6SomA9HzcA/dc+yZ0jm3i+3wWu5EU2n4hZ/Sd7mOwrhoU9nVJZpKi33cg1GPXgA== X-Received: by 2002:adf:fe8d:: with SMTP id l13mr5216035wrr.282.1591720121886; Tue, 09 Jun 2020 09:28:41 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:41 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 03/20] target/mips: fpu: Demacro ADD. Date: Tue, 9 Jun 2020 18:28:21 +0200 Message-Id: <1591720118-7378-4-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-2-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 5287c86..984f3f4 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,12 +1208,48 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(add) FLOAT_BINOP(sub) FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP +uint64_t helper_float_add_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_add(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_add_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_add_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_add(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_add(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { From patchwork Tue Jun 9 16:28:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9604D138C for ; Tue, 9 Jun 2020 16:37:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B11220737 for ; Tue, 9 Jun 2020 16:37:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="phuULrsI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B11220737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihFT-0008Kl-MD for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7F-0005xZ-M9 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:45 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7E-00017E-Le for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:45 -0400 Received: by mail-wr1-x42a.google.com with SMTP id c3so21991970wru.12 for ; Tue, 09 Jun 2020 09:28:44 -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:in-reply-to:references; bh=dfCeaqITGsnWlGdBOBw3AZ0RLQTDRMeG08FAQqk/jUE=; b=phuULrsIv27MuqLY+TRGVFDrOWgQr+/j4y0W/TABLr7oCImvy+5c5kmYtSXzXOLjso XTyPC6pL/VTRtGU+ncy9QcuqbDQtLjVIUg/2O2xuVT3foLmSu1Mhth/dmOBNRYa8fuws dPc/4FX0/5dlGqSrOlpNfAReYTfS7xkl/F2hId7E21eDj6UK20is5a6kxH8tfvpu2Yii BRsVgEMTseWfKfgdgVoi3W4doxIEKA3YgOM2e9FlhrkxvTe47SbknId2u+ZNHL2hP3bo /vfrtiv5432X7BrQI2mnT0ZNObbomSqCPfu/S6TE3uLY6S5QhKriZ5SLARcD3XUMPIN6 nzfQ== 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:in-reply-to :references; bh=dfCeaqITGsnWlGdBOBw3AZ0RLQTDRMeG08FAQqk/jUE=; b=Y2M9jMnDA/jNoZoyEChWkK5XRyWQ/X7QZHSwNliiMboj53ClgMFTiZfaxmgJi4O4yG 9CgOy32PQcyZZA9FrsH+/McGxybzsg+iPgYJN4ckrQvwDkqDf26SbusoSYIJod5hB7Js sZYWGxkAKz/U+oD9f5kr5tDKc+NW+XvSmvr/XeQeCBy8Q0jZFbYoy2Pwamdpg6mh4700 UnrNz4cpGR3LbaSxB0TxvFS6qim3JcbRomwkaIZiXWS5zWy1J1efD3saXuK+eOWJLNYh iRKmBavEWbCZmREQQI4Z3B0XYZtaIukWtVFsyUeo3JPMX/SHubB39HLiCEPIu04spo7n 1UbQ== X-Gm-Message-State: AOAM531HsBZRChpi43CE7tKAtbBQ7bEGDwKqizzY9msx+CdqUTt2n7Hg MitVQFh7vtBnkHFws+nSXyDxzDAs X-Google-Smtp-Source: ABdhPJxnNe3roJ5xel9rtxIkoQgGk7Sr7ohWJEDipnXJJOTjrpw+lXGmk74OsVZi5Zp7e9XY44wj3A== X-Received: by 2002:adf:e4d1:: with SMTP id v17mr5318471wrm.224.1591720122541; Tue, 09 Jun 2020 09:28:42 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:42 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 04/20] target/mips: fpu: Demacro SUB. Date: Tue, 9 Jun 2020 18:28:22 +0200 Message-Id: <1591720118-7378-5-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-3-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 984f3f4..715a872 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(sub) FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP @@ -1249,6 +1248,42 @@ uint64_t helper_float_add_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_sub_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_sub(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_sub_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_sub_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_sub(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_sub(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Tue Jun 9 16:28:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1075138C for ; Tue, 9 Jun 2020 16:43:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9368520737 for ; Tue, 9 Jun 2020 16:43:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WU2WUCrF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9368520737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihLp-0001VJ-PA for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:43:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7J-00063M-2S for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:49 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7E-00017J-QZ for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:48 -0400 Received: by mail-wr1-x433.google.com with SMTP id h5so22030448wrc.7 for ; Tue, 09 Jun 2020 09:28:44 -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:in-reply-to:references; bh=Zv8J6uiqikEoKXTVeDakEnxTIZuunJgq0fWRKMjc/JU=; b=WU2WUCrFHOmii4UNvVP1L7zzaYZDdotIkP4EasCkf/hZW/K4ZyALSaGzkwKhuautov klaqB01xj3xJADeNe+XDKCcoKH+q4LtvRm8bINy/MpXH+ip/Da8B01LwgL4gXX+eWEmg kMKvHh/tL+kDLZN1aFsq3BIqCQiNJDilqQPsrkApWmpNqT0ZRlcE9wT5yIl8CGBbLY13 giVKzJq1Dkh85qz2pSXYoI6dPtAyX8IYoaFmLr+1z0fpWOt197N8xYPe+wLoaa354b8w 9OSOSYRcmZQtUewnJWwYxzFrPUCZgw8Ja31lA9kQvZ6v+8JZ+yGW6nLOgetCuF6EdhQw TQ7g== 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:in-reply-to :references; bh=Zv8J6uiqikEoKXTVeDakEnxTIZuunJgq0fWRKMjc/JU=; b=DALs0/rWHVrEsoemQunDCtpG/AdBZJlzdUhTNVkGg7+Pd5q3rT3rO5lqlUHFSlZQef il1uBAc0GXmVkImUGwvcsW9ajPS52gKrz8mG47iCUgLNCFo1wKBaHqXxlXNn92yUZ+Z7 9/YwdHjy4DBurrmedOyxnD5aHuPrDOAPSgjUVpkpzTgJkf2B+eq/SU9RNGmqAYxTLzqP MXHulhJb7YGxMio58dsm0pwP7ADG3gvoU3QxUbwndrwgo0LOzIF8kiugg338fRcnlAoy vLLDY8AR9pBTKDM0ourmTjTkLem4tr77REUL40Y1HiI8jjpwjHGOxTo/HFT2cKX67VBZ pqjg== X-Gm-Message-State: AOAM530GZapzsnhpbA1/RRcu62ixecl+P/JmruHSr6KEXEaLJUibnqEn MtAPVxYX8YwcMa72BIpfBBXBe5Qk X-Google-Smtp-Source: ABdhPJxDJTZkqE6yktNIQVzSc4EhmjNWA+HBzqw21GdisMCPdCz6UGIVpMIeC+dZVSDRkQjZRG6RaQ== X-Received: by 2002:a5d:508e:: with SMTP id a14mr5137373wrt.335.1591720123115; Tue, 09 Jun 2020 09:28:43 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:42 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 05/20] target/mips: fpu: Demacro MUL. Date: Tue, 9 Jun 2020 18:28:23 +0200 Message-Id: <1591720118-7378-6-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-4-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 715a872..449e945 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP @@ -1284,6 +1283,42 @@ uint64_t helper_float_sub_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_mul_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_mul(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_mul_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_mul_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Tue Jun 9 16:28:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83B5492A for ; Tue, 9 Jun 2020 16:29:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59B1C2078C for ; Tue, 9 Jun 2020 16:29:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r9xxXw/E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59B1C2078C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jih8L-0008Aw-Ki for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:29:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7G-0005zQ-IQ for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:46 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7F-00017S-C0 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:46 -0400 Received: by mail-wr1-x431.google.com with SMTP id r7so22050526wro.1 for ; Tue, 09 Jun 2020 09:28:44 -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:in-reply-to:references; bh=LcgvF2tz7kWMpz1d96iDb8Fsi5AAlyDPfQKDrdqN35Q=; b=r9xxXw/EzDKK0GuBkTBd844U0rwKiTk7EKE5Qnehj6OWai6tA8RMkiu80QJcUPSaM/ pUgUXQpR51oNnsKr0B9SPYP51REwW69HJCjuxoVlnmb2q3NrsKTHk8U3ynpxC1VBBNHW +iWunf66IlYpo2OeLJvhE4dn/pvEh1QmI1AFZP8biOlYwtkwx1zGfHp+fKZxkZ3y1RnJ 3iaDIhUHTP/drktzTEcq/BnL0c8zsZYldMFmCIH/Yx+BTqyx5Y1N6kXVm3wyJF0dRUDF uwYFxuQt4KJco/zLMOXeFcwTQuDNKu9Y2mcoNMfXGuyd/9QaERFWr66Noe0NstHFOwwm g2rw== 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:in-reply-to :references; bh=LcgvF2tz7kWMpz1d96iDb8Fsi5AAlyDPfQKDrdqN35Q=; b=iBWKQtD88F/5GEG9CWEOp4+dOyy0mgEs47l7x26TK/KO2UA/qNP16o4PS8+rKjbdjp odlN4pbM8/hb3ZWmf/1AXtRLDdzivFFCXPQoccIJVJe+t5nNyalZmQb2f8dRRiD5tW5d WYbDsLvay+J+/pK9jmD94U5gUV8XJNbLE4URJPhuAGxPW7lFcKZZKXv90Gu8WuNpE32L FRu6U1E/FzWfAr7dnAJekfeFru47aKrAUl+a0iSDwxqe2nO4CqzUL0zyI4kiw0tHN7gO Y1nTc3yO9jELPZJTEVhFtDKnp7U7tMAsdWExRn+WILAl2yYG5aU68jO73jwRRPmTLyfy xQfw== X-Gm-Message-State: AOAM532T5XO7ItssI259oVuiBuwzJ+krvVtCRyDno043R7yofMPJ/uE9 0PdweBeOWJCCHehVI2NlxdPjga25 X-Google-Smtp-Source: ABdhPJwaIyogCjAYHJGX+k8+tYujwlo6nsB1clYp+Mx3MMw8sjR9p01HoI+taEWp58IHgCppdHys/Q== X-Received: by 2002:adf:fd4f:: with SMTP id h15mr5275264wrs.397.1591720123853; Tue, 09 Jun 2020 09:28:43 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:43 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 06/20] target/mips: fpu: Demacro DIV. Date: Tue, 9 Jun 2020 18:28:24 +0200 Message-Id: <1591720118-7378-7-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-5-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 449e945..2759c99 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(div) #undef FLOAT_BINOP uint64_t helper_float_add_d(CPUMIPSState *env, @@ -1319,6 +1318,42 @@ uint64_t helper_float_mul_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_div_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_div(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_div_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_div(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_div_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_div(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_div(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Tue Jun 9 16:28:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3B9660D for ; Tue, 9 Jun 2020 16:33:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 874272078C for ; Tue, 9 Jun 2020 16:33:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hIX7P3Jt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 874272078C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihBY-0003Pn-Pb for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7H-00060W-5i for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:47 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7F-00017m-Vs for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:46 -0400 Received: by mail-wr1-x433.google.com with SMTP id e1so22047186wrt.5 for ; Tue, 09 Jun 2020 09:28:45 -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:in-reply-to:references; bh=bNpt1BpofhtYBwm3Tfw6OCLr57L4XWG7RV5bc+pnr5I=; b=hIX7P3Jtn7Q+R2fe/nBEPqSz8cmlA+4PpKWKaqbirkLccSRmrIg+M8b+sPNP51PD3n 81qwPcgCuOGU8qJMLYnWIL0bpiS0wi6lG/d27u/Zd9O4p9HXNoJKbDHWmHM1Q8EPiogO dz9S9ggXMtt8oHivIJqdulTfGgfL4+Rcr0CxLAdTizTBSyIMkMxrDsSn6z0uH+34pFgZ fCUr99nxXCU44IvsFnGGM6xbwUBQtmHLhL1mqy8ZH6FCoJ9JedVLZnF+D+GKaygaE22+ 4BlThyzwdxwYhHORehk2ITDOcMo4Ebq1p/anIFLlRBFrMsHQRBAQJmET39RFZpXch5Ww l8Cw== 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:in-reply-to :references; bh=bNpt1BpofhtYBwm3Tfw6OCLr57L4XWG7RV5bc+pnr5I=; b=DGCxi6SIFkmy/j+MlgP54zjPPOHeVIB1BLVee+GJcHBTOm5cSDu3VVcU/KM5VzDf7P LwcRLPRkWXhWXwnt4NAUBH6ChbgVD+qaEnp4SxbQm0FUOt+8O+dnZgVWmwUSeBPrJG6U BidIlr34PzJrpV4PTP+nmVP3xTLxZQ0ZIb0fHv6Iu84KuZTZW5iuwsG4Jvr5Wzzo8kb3 +2jUp2JuKcw+mP35uiCgN0Lu43KG3vJ80hNEpwJGCyC0DcjDlkV/GlO/MyPXQ6Do2+xV Bm2HiJATPDfIDg0N+RO8sC6cVi7Y9gr1v2x95JmyKxYbfsDPgOFMjkolhFTU9UtWyRS4 P5qg== X-Gm-Message-State: AOAM530OywR3PYCW8hnTt3ifUuzfomaDOUKaSS+dvjKmJFEmlgB1L+5W xo2XSgA3y8hP50TS3loUKhWUo16l X-Google-Smtp-Source: ABdhPJwUYUXjvDXlV31z+R34p/m+C65GOBOQkRYA441jKLMK4TMpqBAcVlSV+wjqdlHQBKqRDAxlrA== X-Received: by 2002:adf:82cf:: with SMTP id 73mr5140593wrc.382.1591720124539; Tue, 09 Jun 2020 09:28:44 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:44 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 07/20] target/mips: fpu: Remove now unused macro FLOAT_BINOP Date: Tue, 9 Jun 2020 18:28:25 +0200 Message-Id: <1591720118-7378-8-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., this macro is not needed anymore. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-6-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 2759c99..a3a3968 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1170,45 +1170,6 @@ FLOAT_CLASS(class_d, 64) #undef FLOAT_CLASS /* binary operations */ -#define FLOAT_BINOP(name) \ -uint64_t helper_float_ ## name ## _d(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1) \ -{ \ - uint64_t dt2; \ - \ - dt2 = float64_ ## name(fdt0, fdt1, &env->active_fpu.fp_status);\ - update_fcr31(env, GETPC()); \ - return dt2; \ -} \ - \ -uint32_t helper_float_ ## name ## _s(CPUMIPSState *env, \ - uint32_t fst0, uint32_t fst1) \ -{ \ - uint32_t wt2; \ - \ - wt2 = float32_ ## name(fst0, fst1, &env->active_fpu.fp_status);\ - update_fcr31(env, GETPC()); \ - return wt2; \ -} \ - \ -uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ - uint64_t fdt0, \ - uint64_t fdt1) \ -{ \ - uint32_t fst0 = fdt0 & 0XFFFFFFFF; \ - uint32_t fsth0 = fdt0 >> 32; \ - uint32_t fst1 = fdt1 & 0XFFFFFFFF; \ - uint32_t fsth1 = fdt1 >> 32; \ - uint32_t wt2; \ - uint32_t wth2; \ - \ - wt2 = float32_ ## name(fst0, fst1, &env->active_fpu.fp_status); \ - wth2 = float32_ ## name(fsth0, fsth1, &env->active_fpu.fp_status); \ - update_fcr31(env, GETPC()); \ - return ((uint64_t)wth2 << 32) | wt2; \ -} - -#undef FLOAT_BINOP uint64_t helper_float_add_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) From patchwork Tue Jun 9 16:28:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596081 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AC78912 for ; Tue, 9 Jun 2020 16:36:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA75720737 for ; Tue, 9 Jun 2020 16:36:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RgtVJxuU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA75720737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:53408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihEP-0006oK-04 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7I-00061o-2i for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:48 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7H-000181-2i for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:47 -0400 Received: by mail-wr1-x433.google.com with SMTP id l10so22005659wrr.10 for ; Tue, 09 Jun 2020 09:28:46 -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:in-reply-to:references; bh=0BZ4x4anBfvXpjdOs8Rd0q5VGAIXWA6JFuqow7ewRvE=; b=RgtVJxuUgEKB1MKgsBhBHTnevwcDgnvVwEmcoWb/iNSIE6PNFgtjcLLjY1BgnMi4ns QEAsaF/O0TWAYr/O58LRYt9ujt16qzggacgdp+W5mS+R0G9+57/mpv1BiDztIAyiRtnL 3vL1s9eCvehw9Lz7u03/npo6mJ2R90JD97NNbfWWJWb8tTCSnm/1PxCfFYkofWpPzCGm vynWN5G7qak/ukAzGe0own6rg8qdMQD3tXA/tY0OYkZ8+ZyHWIwxJzYoSFxDw/OZ7eOB Zj/Crk9D5xzNoXSIsO3IN4i4KBRSD0pwYKXdShVmZmDRkG3qX7mM4W0A3/8+aso4iaCY txTA== 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:in-reply-to :references; bh=0BZ4x4anBfvXpjdOs8Rd0q5VGAIXWA6JFuqow7ewRvE=; b=hyx8IHlwMFihQtn/C/hPJ/PgcPHr0fneLst2bqxw4B3XYPYWUvuX+ZE+yeRHbtplyK BRWsMVNePV9pYqnV8aifa1Un1PMoBJEqnT4gYxGOqZSzW61fOcsI8thk9QEvp/UEGe0L nVWIxkxiVowUrRHIqYC1tKs5qjxkBuxmCOhixGg9irCGaI1RyF8NzTCyB8Kj+lM372Ao DUJnkpxVWycoFrPEf7VOGsKUWUmFfAU12kjmDFaMsPlTME/EgHieVEQnxHLvTa+P36/b rI1agJe8kioofHzD0Vxb6BIgQyulhCa3XyzAMdfI4rbil+1gGvrr+3EyK3I6K2A2jzSO yuiw== X-Gm-Message-State: AOAM533/ZB2vi6l1IwwFywTL2BqpCestzilVmHtFloy2zeQe5THGqyzv tWIrkjew4mjTVwqLw1Arf+70diMN X-Google-Smtp-Source: ABdhPJzs8XrCeGIUbaj0HdvPGm15D6U1OzvSNDeV9XFUnvQYd+Bj6sMKy7s+RO/fWAVvdffFt0jc4Q== X-Received: by 2002:adf:b354:: with SMTP id k20mr5356491wrd.412.1591720125661; Tue, 09 Jun 2020 09:28:45 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:44 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 08/20] target/mips: fpu: Demacro MADD. Date: Tue, 9 Jun 2020 18:28:26 +0200 Message-Id: <1591720118-7378-9-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-7-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index a3a3968..c070081 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,12 +1495,51 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(madd, 0) FLOAT_FMA(msub, float_muladd_negate_c) FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA +uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_madd_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ uint ## bits ## _t fs, \ From patchwork Tue Jun 9 16:28:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596087 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34A1B913 for ; Tue, 9 Jun 2020 16:38:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07F2020737 for ; Tue, 9 Jun 2020 16:38:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uqwmp7Sc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07F2020737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihGf-0001z9-70 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:38:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7I-00062z-RM for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:48 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:42745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7H-000188-RO for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:48 -0400 Received: by mail-wr1-x429.google.com with SMTP id p5so22000208wrw.9 for ; Tue, 09 Jun 2020 09:28:47 -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:in-reply-to:references; bh=mKLFPgsWgD/xkTS5Zee+NPgakjv1FOsKba/HH44GwFE=; b=uqwmp7ScIT6J21XW8Tf7bRjRPP5amvg9zR6hsWsaUZHxlIYUKXwCaIkDPvrVBJw6ks xHUP5hxJqr5W4tAV45Q/nm0pbBJGCDHBTTV6Jcoy/x0ZP+rqB6gEcNQgzKksZQ0/ZRDS WeInf/AltAGvAuZ+UHp82qndiHAPcuIpcKIThPZz38rlV8WVlSucVuLXJqlcX1qD9wjp z8Gzv6a2WuRSs59LCPWPrkVqK/MllhVFywJqi60fUGZAu8x6pC5mywEMKGT9fCsmwo9b i2n/3Ts+/y7D0EFw9BVX8SUO8M/KCoFZHrlgyIEnKqVhjDmcIojwHnuTaB7Wf8r4iCbv SUHg== 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:in-reply-to :references; bh=mKLFPgsWgD/xkTS5Zee+NPgakjv1FOsKba/HH44GwFE=; b=nwPLLouXQ1wJ0MLw2rNoSxEychfYsPSU4d59PAWzyDn2+tW/eNbbPzOG2zKEAaR3OZ GepEpH6WhF2ajw1+/Eq7Cb2/kWfTvt7ja1wMfHbYAuwHZinsQlvnopxpF1miIrMYgbvo tKqryN130WhSYL6V4yquGnZUWkxCwZIqSoDUSSCqHQVa8VQBXrCOLcr9Lz2SUgFGb38u /mlEDnBPm7/t3uSDj5ZGoU216bz1z0ukVORiEQbhGxWKMYL2o9i/gk7oCCLI2PXikrMo JKF62zzG5yQLA8yD3hI5mWsX2Qd+jucuJJdUXOm1YoiOxDUD84VeF0AyJ51MDgOglroj aW8w== X-Gm-Message-State: AOAM533dZUYQA6lZstWmnh8FRJhBB9t4efI6gerWIg15aU2mnsPTcoSP q7M4Ssu5ZIA4gNCZMb2HhIcdlRSi X-Google-Smtp-Source: ABdhPJwv7Nsy6GYsHaCxf3WV0gOc7z73O+RB5qAYs2b55JrDYQ2wkiNmpAjYrvg/Ha2owD4OfbLpig== X-Received: by 2002:adf:d84c:: with SMTP id k12mr5341489wrl.265.1591720126269; Tue, 09 Jun 2020 09:28:46 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:45 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 09/20] target/mips: fpu: Demacro MSUB. Date: Tue, 9 Jun 2020 18:28:27 +0200 Message-Id: <1591720118-7378-10-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-8-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index c070081..e37fc40 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(msub, float_muladd_negate_c) FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA @@ -1539,6 +1538,45 @@ uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_msub_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_msub_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Tue Jun 9 16:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596091 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13605913 for ; Tue, 9 Jun 2020 16:39:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC00120737 for ; Tue, 9 Jun 2020 16:39:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V5V8sKI8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC00120737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihHX-0003TN-2c for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:39:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7J-00063z-GG for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:49 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:38798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7I-00018J-Fg for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:49 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e1so22047331wrt.5 for ; Tue, 09 Jun 2020 09:28:48 -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:in-reply-to:references; bh=5sXF/az5kQhp13/eu0ouGNik7qqbeKCa9azeT75DNvc=; b=V5V8sKI8ddlBRjfnbTEvsCTie2I4pJd17Viy9ynI+kELhMjrRSLPZ/Pwuv2TEjBQLx OGkHJAzWE8raUAWvZJz0YHgYkyhUkr6wY0Nnwp+hu0YbgnXXQXPYmf9cJc5T3GHTaBzL RXe0kIMJHDGDwGT4+rbhYMuZ4hmsZFwEv0YrCef9WbbpwO64ESFKDqn1Bv+4WI+Yu5p9 eA1tHEq8Hw5njqgIDDdzeILjPRIuonqANBoFNhNaEGX18e0GaOqnfSqLKJ3HO2ibgoEr VRd79asEtc+on4ssWsr5seMIoZFIzA5krSXHVe4szLgeFdCzgRLyM7zyO52w1PBgkR7s bGQw== 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:in-reply-to :references; bh=5sXF/az5kQhp13/eu0ouGNik7qqbeKCa9azeT75DNvc=; b=NVQYcAwVFNB2XLkGDitoJo8U+S6a9PaOgpqXTKJoY6qHkqhms/KWqk67IAIWmGzSpY UVLU0mLuue32HGRPfYMoljjEUvAEADW2FktanPNUDW8JS6yrdHYa1ccuWrFupsUW7fnu zwcre80ryEvjZXfWa80wGqD/TJNvBmtlqj5xJymCYtRVzD+s0o5PmB2dX3+i//NuiU88 U5uG3Eq1bSRBF4VsW0YECThyZVOuSqYYeV/uQBr0liHY2gtc7UigV67SnGA96o54h8yC bNfmIw/V+ybv9dO5GXI6cEHC0Br+NnqpRY9fflA7CnkQ9KykNv2HEjEf2L0/W/faRIre d9xA== X-Gm-Message-State: AOAM533O7SbrMfPfk0Pfnq3o4BTWkbOrJ7o29OPdsbTlbjpj+1k9tvNF SHHiENCTeSYYzC2ZwBGcJgJ79Pns X-Google-Smtp-Source: ABdhPJyqzu+OW3x/6MODy1CsJa9AOxTEi/NHnzcN2o5O9LA9DA7M3kEMhKmsQanLFpA8VNL6lgYuPQ== X-Received: by 2002:a5d:4d01:: with SMTP id z1mr5769618wrt.29.1591720126963; Tue, 09 Jun 2020 09:28:46 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:46 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 10/20] target/mips: fpu: Demacro NMADD. Date: Tue, 9 Jun 2020 18:28:28 +0200 Message-Id: <1591720118-7378-11-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-9-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e37fc40..d4c065f 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA @@ -1577,6 +1576,49 @@ uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_nmadd_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float64_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_nmadd_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float32_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); + fstl0 = float32_chs(fstl0); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); + fsth0 = float32_chs(fsth0); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Tue Jun 9 16:28:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF175913 for ; Tue, 9 Jun 2020 16:42:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCE8320737 for ; Tue, 9 Jun 2020 16:42:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Grq8xbAl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCE8320737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihKq-0007ls-U1 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:42:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7K-00065L-5B for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:50 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:40896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7J-00018Q-7A for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:49 -0400 Received: by mail-wr1-x42b.google.com with SMTP id h5so22030649wrc.7 for ; Tue, 09 Jun 2020 09:28:48 -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:in-reply-to:references; bh=qhXQDfigvQAa5am0DFMzGb3Q9KjScPlDz0AhwwxSsDE=; b=Grq8xbAlQmRzrxdYNVlLC79CJ2QymURg/GDDKKUi/Hhf+P18DPsdrUXvjx2DhlIJ69 MrmaPtAXgNc2VEdw/v2N2fwfCLj/FsrcnBr3QQBRPVsniWtrIP96/tnCKWv0zMShysuX FErWDZqgujf97bEaHNlY1zxAfnyIvozd5evo/ccx4DR/ECCpnlqUofxJayEFkS41BslT rLJdad1tQxODvTO8lltzh7AnbgccaBwVvOPXIzhEZgQ+qbyrRA3rzrZWe9ZDmRzqLZ/V VTPz69ON/zN7HUxlC89noIzr/5NX0PVkubDZ861NuPVT8Vp/D72QuZkahhgD0F01SFH4 gYOw== 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:in-reply-to :references; bh=qhXQDfigvQAa5am0DFMzGb3Q9KjScPlDz0AhwwxSsDE=; b=fjsGerFw6JYVHNL2eY74x25fTMJcZnuls9l/YkSEn7nSjm1vhhfEAZTFM2fJLVNkB2 UotEICGrs7VOB/sb2vO3adDafNJJBgsuK9ituFZnniYAUxP17xFJ9VtsiFTXzVdGegH1 yjs1RuRBgVZqVGxaexAhNBioQcxlRogegwax3YrZ0EzU39q+qgWh1FgEtJptjmmPuKEd DckU4CrE8eya+Nbp4PoUvFIVZnH7OM52NI45An8FUxSzoj6YyL7PQigVJWGfEPcpAoV+ AnpNmUyzKB+VhkPO9aLn9NlHzVIGPy7+EGuDCuJRLUCIpaw9nuuvLwDkgB8s+MsKzkPk nY5g== X-Gm-Message-State: AOAM533IMmaejPkO5XpbyNau0Id/7sam72DrB3FGsR5/Q5K7l58CP6Nj j9A08nwZHr23lasJ/30gbFYVZ27m X-Google-Smtp-Source: ABdhPJz9KDTGMVDqSFcwK4O0ysmRZ2fIwcUOsb7gVcYez9abpOGHn8DdNQjR/3YRlISpBba2L0CiyA== X-Received: by 2002:adf:e3c4:: with SMTP id k4mr5314151wrm.262.1591720127725; Tue, 09 Jun 2020 09:28:47 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:47 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 11/20] target/mips: fpu: Demacro NMSUB. Date: Tue, 9 Jun 2020 18:28:29 +0200 Message-Id: <1591720118-7378-12-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-10-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index d4c065f..927bac2 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, @@ -1619,6 +1618,49 @@ uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_nmsub_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float64_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_nmsub_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float32_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_nmsub_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); + fstl0 = float32_chs(fstl0); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); + fsth0 = float32_chs(fsth0); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Tue Jun 9 16:28:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596121 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2778192A for ; Tue, 9 Jun 2020 16:46:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B064E20737 for ; Tue, 9 Jun 2020 16:46:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UNkD3ye6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B064E20737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihOa-0005Mp-Lu for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:46:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7K-00066s-VG for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:50 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:40898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7J-00018b-Vn for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:50 -0400 Received: by mail-wr1-x42d.google.com with SMTP id h5so22030687wrc.7 for ; Tue, 09 Jun 2020 09:28:49 -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:in-reply-to:references; bh=q6q7t9tSS7YYJl/56wzx9zU6oawDbEcXsYW5V6PJrnU=; b=UNkD3ye6R+xi9ktEu2o8dQTQj61p0hDct8EYMHizaXTzxVwChGM62A7kgln/USlPoa 3x5rT2aSqkVBZKUNywhjge/sOevg3Kx8gbwieI7sO/u4ut7nNhsYGZDIxzPHQ2Ptejkn 7x1uatapae9NIe+H+J9ST7jIdOJYhASTjJ4qCxA+4mFtsviqwSSYye5kqkyp3XyoPCC3 3ZCe1eZfchz0+KukgTqMEO37ll0xdn6PgEO4tmU8s0Cn/aritkpfuLbSMQxOw4X+SQkP 94zT8Gs/IIuMVFA0Hv0EOCNxFixw1XvaPzEb4nbBe5qV09+yhhySgtjKTLdvz2uJFmEh 5mgg== 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:in-reply-to :references; bh=q6q7t9tSS7YYJl/56wzx9zU6oawDbEcXsYW5V6PJrnU=; b=k0S1S4mMSkYGYEuxrJvIiEmhuuT9YJ93xaT5Fe+P7oO2c5kFG8RRVgTNrte/EfxiKg Bawu7L/NOTYXQaqnsKDS5XPyjcfshzzEUJpngR8P4JnQF/tbC3wykIOnYb6ehC5zDSSt m7y1xiN3e1v8fAd7Dd7JVXVPHVfiCGkptNm1nfd7Cng8BAtJMojXY1zCOWGFD95pGlZ/ tXcaWWUDXo92eMNz6NUTOanfEW0mNrxTUWkm8CRuWCQbIX82T3OTi2IWQM/151Ai9uXi 6DOlPXycr5sEi+wECi3ushMKjqx+17EMDO3XyIMFGGNcvgIrc4+Z9Ig82yAFAnKFiDaO HrwQ== X-Gm-Message-State: AOAM5316b9RyZaIWhr9+IxNySVV+Rpn9IItDeFw8sc3/TwfIJlrWXx5s f43SZxplNG/jAVJDtH1uJhALAhYl X-Google-Smtp-Source: ABdhPJyRV/pE0McdQTam+GRWHJNNCDTZhJ6or5l1Y0LgAvuAY8LZM9DIKLLEgS7d77PLVoZ1VEDXcQ== X-Received: by 2002:a5d:508e:: with SMTP id a14mr5137726wrt.335.1591720128420; Tue, 09 Jun 2020 09:28:48 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:47 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 12/20] target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros Date: Tue, 9 Jun 2020 18:28:30 +0200 Message-Id: <1591720118-7378-13-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., these macros are not needed anymore. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-11-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 50 ------------------------------------------------ 1 file changed, 50 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 927bac2..e8e50e4 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1446,56 +1446,6 @@ FLOAT_MINMAX(mina_d, 64, minnummag) #undef FLOAT_MINMAX /* ternary operations */ -#define UNFUSED_FMA(prefix, a, b, c, flags) \ -{ \ - a = prefix##_mul(a, b, &env->active_fpu.fp_status); \ - if ((flags) & float_muladd_negate_c) { \ - a = prefix##_sub(a, c, &env->active_fpu.fp_status); \ - } else { \ - a = prefix##_add(a, c, &env->active_fpu.fp_status); \ - } \ - if ((flags) & float_muladd_negate_result) { \ - a = prefix##_chs(a); \ - } \ -} - -/* FMA based operations */ -#define FLOAT_FMA(name, type) \ -uint64_t helper_float_ ## name ## _d(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1, \ - uint64_t fdt2) \ -{ \ - UNFUSED_FMA(float64, fdt0, fdt1, fdt2, type); \ - update_fcr31(env, GETPC()); \ - return fdt0; \ -} \ - \ -uint32_t helper_float_ ## name ## _s(CPUMIPSState *env, \ - uint32_t fst0, uint32_t fst1, \ - uint32_t fst2) \ -{ \ - UNFUSED_FMA(float32, fst0, fst1, fst2, type); \ - update_fcr31(env, GETPC()); \ - return fst0; \ -} \ - \ -uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1, \ - uint64_t fdt2) \ -{ \ - uint32_t fst0 = fdt0 & 0XFFFFFFFF; \ - uint32_t fsth0 = fdt0 >> 32; \ - uint32_t fst1 = fdt1 & 0XFFFFFFFF; \ - uint32_t fsth1 = fdt1 >> 32; \ - uint32_t fst2 = fdt2 & 0XFFFFFFFF; \ - uint32_t fsth2 = fdt2 >> 32; \ - \ - UNFUSED_FMA(float32, fst0, fst1, fst2, type); \ - UNFUSED_FMA(float32, fsth0, fsth1, fsth2, type); \ - update_fcr31(env, GETPC()); \ - return ((uint64_t)fsth0 << 32) | fst0; \ -} -#undef FLOAT_FMA uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, uint64_t fst1, uint64_t fst2) From patchwork Tue Jun 9 16:28:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596119 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7FDC913 for ; Tue, 9 Jun 2020 16:44:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DD5A20737 for ; Tue, 9 Jun 2020 16:44:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cqaJbdNT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DD5A20737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:54798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihMX-0002xl-QZ for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:44:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7L-00068b-QN for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:51 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:53093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7K-00018h-QR for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:51 -0400 Received: by mail-wm1-x336.google.com with SMTP id r9so3445575wmh.2 for ; Tue, 09 Jun 2020 09:28:50 -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:in-reply-to:references; bh=RA+GMo5/JhIr5pjMfgPHglQEmrYL6LlTpxySPG4HNjs=; b=cqaJbdNTCKPKu4URElRRg20BW0emBxP2PjM9kvyPnxfm2Gce6SZbFlcodbjLSlLAm2 DMAsdij9/KeuJERGkHjmsQslE7BxUnf5jIQioDyoFtAwN6VvhXhjHsWx/kmS68P8zeRs 0hIXJyA2smtQ892NPPkSDgKXMJMNaS/LNnY8d8qnoPzw9eP5nicS9lg/8p1hZzQEA8HT L6/oyJvhJTTVufKzAm9Sh1C4YIwgCn5Wu1bONdz6Ns+ckWDf8IgQdCs6pX+7h0Ai3A1A wZUWnryBzW9GNedxmRicuHPrhuX5t7UHJQLLDOC8wK/MGwcGmvKuPHO3qLHA4GwbHtfr S2eg== 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:in-reply-to :references; bh=RA+GMo5/JhIr5pjMfgPHglQEmrYL6LlTpxySPG4HNjs=; b=SOnHacUIzOF+6mQa395kkVog9bGsLS7xrxrtL53QkPFbH3OMEwYF8QKBYgIgaCwi/b 2k1fr4r4WRl9uTgANrJG/aFLZoh0zn4aFnHht+KfG2a9pHDRicAlMUy2PEUCsgs3aiNh El7MTNCoN0Wz8Q5wQ2gNfbOyIEOGanhgukjQZDtCVtOv4w/x/FM0tt/ob/X8Cx9AsOVg u+GynWvYDkQ9k5HCqtSU5G4ltOg/79/dgwX514ZJtvP8xyUDZ0Olwq6k4M389CZiApZQ QsdyF1sddEJszYEGhLW5ktsYwAwwD2Q2VKvRp7S/KUSO8fCup9IMUs5XsaPDdI4OmzSx a/qw== X-Gm-Message-State: AOAM5312oZQ3fwAGgNnrTh1tnvhNgpAhWj4o/XvpLGyH7M/6usuPvuPB z0nsAPhi/WXl9S3IbQ1dR7I+XczW X-Google-Smtp-Source: ABdhPJwKVq30DjrX2l2EKVZG27PW42yokLUdsL/JMH+Q0BeZEktNG5y7pSUBgcBtlyCD9IGDQckucQ== X-Received: by 2002:a05:600c:2201:: with SMTP id z1mr4856619wml.70.1591720129160; Tue, 09 Jun 2020 09:28:49 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:48 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 13/20] target/mips: fpu: Demacro CLASS. Date: Tue, 9 Jun 2020 18:28:31 +0200 Message-Id: <1591720118-7378-14-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-12-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e8e50e4..b3903f5 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1165,10 +1165,76 @@ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ return float_ ## name(arg, &env->active_fpu.fp_status); \ } -FLOAT_CLASS(class_s, 32) -FLOAT_CLASS(class_d, 64) #undef FLOAT_CLASS +uint64_t float_class_d(uint64_t arg, float_status *status) +{ + if (float64_is_signaling_nan(arg, status)) { + return FLOAT_CLASS_SIGNALING_NAN; + } else if (float64_is_quiet_nan(arg, status)) { + return FLOAT_CLASS_QUIET_NAN; + } else if (float64_is_neg(arg)) { + if (float64_is_infinity(arg)) { + return FLOAT_CLASS_NEGATIVE_INFINITY; + } else if (float64_is_zero(arg)) { + return FLOAT_CLASS_NEGATIVE_ZERO; + } else if (float64_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_NEGATIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_NEGATIVE_NORMAL; + } + } else { + if (float64_is_infinity(arg)) { + return FLOAT_CLASS_POSITIVE_INFINITY; + } else if (float64_is_zero(arg)) { + return FLOAT_CLASS_POSITIVE_ZERO; + } else if (float64_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_POSITIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_POSITIVE_NORMAL; + } + } +} + +uint64_t helper_float_class_d(CPUMIPSState *env, uint64_t arg) +{ + return float_class_d(arg, &env->active_fpu.fp_status); +} + +uint32_t float_class_s(uint32_t arg, float_status *status) +{ + if (float32_is_signaling_nan(arg, status)) { + return FLOAT_CLASS_SIGNALING_NAN; + } else if (float32_is_quiet_nan(arg, status)) { + return FLOAT_CLASS_QUIET_NAN; + } else if (float32_is_neg(arg)) { + if (float32_is_infinity(arg)) { + return FLOAT_CLASS_NEGATIVE_INFINITY; + } else if (float32_is_zero(arg)) { + return FLOAT_CLASS_NEGATIVE_ZERO; + } else if (float32_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_NEGATIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_NEGATIVE_NORMAL; + } + } else { + if (float32_is_infinity(arg)) { + return FLOAT_CLASS_POSITIVE_INFINITY; + } else if (float32_is_zero(arg)) { + return FLOAT_CLASS_POSITIVE_ZERO; + } else if (float32_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_POSITIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_POSITIVE_NORMAL; + } + } +} + +uint32_t helper_float_class_s(CPUMIPSState *env, uint32_t arg) +{ + return float_class_s(arg, &env->active_fpu.fp_status); +} + /* binary operations */ uint64_t helper_float_add_d(CPUMIPSState *env, From patchwork Tue Jun 9 16:28:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596145 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3947913 for ; Tue, 9 Jun 2020 16:53:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77EFD20737 for ; Tue, 9 Jun 2020 16:53:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CIfb8iSh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77EFD20737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihVT-0007oF-Lm for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:53:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7R-0006KC-Ap for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:57 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:51221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7P-00019Q-Eb for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:56 -0400 Received: by mail-wm1-x32f.google.com with SMTP id u13so3452476wml.1 for ; Tue, 09 Jun 2020 09:28:55 -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:in-reply-to:references; bh=UQ2Sy3jjpiezdKYPxmeYXsC8SSB4J+vTd+4MX7GuzJY=; b=CIfb8iShBC5aOnSW1PYEZAb99aT3e2bVO9YY9DGp6t8fWfCjVC2szYVF7ev5VMMVc5 xr6ofameQKrp0wGFiBzju/Hcxt83heCL1pgC1rpOohIAvDafzS9O5wc52ySqw6RT+LE6 8PSejBp5Z++MyBtssfeleeti1Xih8sVddFN4RO4rcZ7mY91UxPdOfCbVDpdN/MqTCedC jEkVWUPshiB3kqROflE+KYqpWsUZ3DntUCia3G2c4MI1X4iZSTNRXld6tg4J7/+wyNXK BRlHccsxkeGUiOdmp5/tCfyMt1J7lbR9pyplgYqpKQUyPcHjLQb852b9PjUoTH+oVkCj 4mzg== 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:in-reply-to :references; bh=UQ2Sy3jjpiezdKYPxmeYXsC8SSB4J+vTd+4MX7GuzJY=; b=OaePNEl02M8WOIBDRUDcQBgPf57+S3DqWivnx0IagphpUMx/NZH4tx9raLoQ0OK7kl Xj9Lv9JC0dKy7byZbQyyIN/7dnPHo1tEZdcmyacRQpZSmn5BGxveKmWY+QvMQ95aVGr+ LWZ3KwPO2OpV7cjTxRC39+dXxvVFHBuTmpFIZr/q2tWSrT3gr7zX3W9bATKJiAz4qOiP hm4d0OG+ixbkYXR4t/HYDOW8XtAVcAJhvlh09CYgButHyVFIWvXcIFvChmW3haATTscs wGnzox4Md9oJAmygINubjlO7pat9mLrYcFfey01TWbDYMe43rAxBV9Ysm1Xta0LsuiBm FPyA== X-Gm-Message-State: AOAM530fRipPyzz4rQ3fYIxzd2lDIhldqmi42Hh4z0oH8l4Ep5zY3zK+ KHlUyujG+fWb9Usyy52CfIOEqBJm X-Google-Smtp-Source: ABdhPJy5xebvu01Ak5+FKTRDfBEkpvVmKpVGqFxbylmJtpLbURz80VJAor99uxNE97O60GzhWlPqtA== X-Received: by 2002:a1c:2506:: with SMTP id l6mr5013860wml.34.1591720129930; Tue, 09 Jun 2020 09:28:49 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:49 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 14/20] target/mips: fpu: Remove now unused FLOAT_CLASS macro Date: Tue, 9 Jun 2020 18:28:32 +0200 Message-Id: <1591720118-7378-15-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wm1-x32f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing CLASS., this macro is not needed anymore. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-13-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index b3903f5..e227e53 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1128,45 +1128,6 @@ FLOAT_RINT(rint_d, 64) #define FLOAT_CLASS_POSITIVE_SUBNORMAL 0x100 #define FLOAT_CLASS_POSITIVE_ZERO 0x200 -#define FLOAT_CLASS(name, bits) \ -uint ## bits ## _t float_ ## name(uint ## bits ## _t arg, \ - float_status *status) \ -{ \ - if (float ## bits ## _is_signaling_nan(arg, status)) { \ - return FLOAT_CLASS_SIGNALING_NAN; \ - } else if (float ## bits ## _is_quiet_nan(arg, status)) { \ - return FLOAT_CLASS_QUIET_NAN; \ - } else if (float ## bits ## _is_neg(arg)) { \ - if (float ## bits ## _is_infinity(arg)) { \ - return FLOAT_CLASS_NEGATIVE_INFINITY; \ - } else if (float ## bits ## _is_zero(arg)) { \ - return FLOAT_CLASS_NEGATIVE_ZERO; \ - } else if (float ## bits ## _is_zero_or_denormal(arg)) { \ - return FLOAT_CLASS_NEGATIVE_SUBNORMAL; \ - } else { \ - return FLOAT_CLASS_NEGATIVE_NORMAL; \ - } \ - } else { \ - if (float ## bits ## _is_infinity(arg)) { \ - return FLOAT_CLASS_POSITIVE_INFINITY; \ - } else if (float ## bits ## _is_zero(arg)) { \ - return FLOAT_CLASS_POSITIVE_ZERO; \ - } else if (float ## bits ## _is_zero_or_denormal(arg)) { \ - return FLOAT_CLASS_POSITIVE_SUBNORMAL; \ - } else { \ - return FLOAT_CLASS_POSITIVE_NORMAL; \ - } \ - } \ -} \ - \ -uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ - uint ## bits ## _t arg) \ -{ \ - return float_ ## name(arg, &env->active_fpu.fp_status); \ -} - -#undef FLOAT_CLASS - uint64_t float_class_d(uint64_t arg, float_status *status) { if (float64_is_signaling_nan(arg, status)) { From patchwork Tue Jun 9 16:28:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596129 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA6EF913 for ; Tue, 9 Jun 2020 16:49:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8021320737 for ; Tue, 9 Jun 2020 16:49:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BI1obM8y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8021320737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihRC-0000cq-K6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:49:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7N-0006BN-0c for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:53 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:54140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7M-00018u-44 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:52 -0400 Received: by mail-wm1-x32e.google.com with SMTP id l26so3439904wme.3 for ; Tue, 09 Jun 2020 09:28:51 -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:in-reply-to:references; bh=bMx4kzjHRHhQJjT8ZJt6++cIuGHlJtI86oQzfpzysks=; b=BI1obM8y5SgFslDkZ+/6zqe6T85WhRdvjT8/N6cTWVHOmOrHuIAJKB/vgHH3fuvekb Cohj2YTJ8bAmmI02JgeG8jIS1Tc29V4ffUzB/DbuN03zH9gsyIn9K/SFtbstd9tSKpmF 6lueMpjalBAq0By05hs/e8xyf3vPCW1MUemhUGUyjdiKCrXxY11xwx/l+NSIl67cMtFD 5WAKDbhd5YoHhuuzb4jD6rnCs06Ls25jrgOu5tRI348n8wyZGQDnKEQ/kp5jeHItxEOe z0RvjIJgvtx0Yb4LLmZJeFg5pXTBHRb8gIg0iCIKsZpd6nIOm4fh9gzTWFee3j9QutkE JDzg== 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:in-reply-to :references; bh=bMx4kzjHRHhQJjT8ZJt6++cIuGHlJtI86oQzfpzysks=; b=jkxgmcaKZopykJPONh0DEKzQIRcWjtIsT7To491p7SL9qjALsDg1UOm54uyV0ydz0H TgBjyRi1pZI5ieMeePUvEyGGjPF/w5wBtXCTzjb6xHam01yphB6yq/kZEzynyzGhwW+C ZeJlgE7CafXaB8ieaAkekTKbwJZIYjpK5vHbbkP7uCy6KPD62ZWodCvymYOfR2ozANUM 3ziSvTHkapnSKGRXhMjvozf1XIj6n9BgookZX8Os7QNPUun4lOjJLc1FOPew+t5UH/SB 5ItHMm5G+5Im4L4axHgKkoU+98HxyNcExc1ceogKt+aDCCd3H63Zwz43i2jOuS0FnhmP 6FlA== X-Gm-Message-State: AOAM531Z80UoGoTTsPnUUqr07oonC1MFO7rwjzCnBgwzcYMfC54Ci+br +rTrJMblqrM72gOUFxR684fYxYL5 X-Google-Smtp-Source: ABdhPJxa5szMWYYFoGZVqyk1Ve9AbowzNboNKPApj0ZXcZk8THTHVgFW4P1erfmsWwUtjOibtTt2/w== X-Received: by 2002:a1c:49d6:: with SMTP id w205mr5018010wma.151.1591720130716; Tue, 09 Jun 2020 09:28:50 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:50 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 15/20] target/mips: fpu: Demacro RINT. Date: Tue, 9 Jun 2020 18:28:33 +0200 Message-Id: <1591720118-7378-16-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-14-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e227e53..dae1331 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1113,10 +1113,26 @@ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ return fdret; \ } -FLOAT_RINT(rint_s, 32) -FLOAT_RINT(rint_d, 64) #undef FLOAT_RINT +uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) +{ + uint64_t fdret; + + fdret = float64_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + +uint32_t helper_float_rint_s(CPUMIPSState *env, uint32_t fs) +{ + uint32_t fdret; + + fdret = float32_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + #define FLOAT_CLASS_SIGNALING_NAN 0x001 #define FLOAT_CLASS_QUIET_NAN 0x002 #define FLOAT_CLASS_NEGATIVE_INFINITY 0x004 From patchwork Tue Jun 9 16:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596123 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4062F913 for ; Tue, 9 Jun 2020 16:47:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16C3020774 for ; Tue, 9 Jun 2020 16:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="teVwhhcT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16C3020774 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihPX-0006hx-9O for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:47:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7N-0006CP-Fv for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:53 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:39467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7M-000191-Lc for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:53 -0400 Received: by mail-wr1-x431.google.com with SMTP id t18so22032738wru.6 for ; Tue, 09 Jun 2020 09:28:52 -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:in-reply-to:references; bh=JJdgGNmD+Xij1ICoEW9/1LslSZLxJsuLiu6yxyxEF/g=; b=teVwhhcT6SPy5MWelRl0HJ89uw6BuDYqzI5x/yc7s4sNc1jRsO9XXIVa6gWRDfSTql adOAF9Wp3M25dwiSr/SOgLj9VJ+o0fwoISY93OlWvtfawWoZ2ODW7Ry2nciMWyXsx45B JNuiMplLzzXod4pyh7So7AWalmwYL6ipRHAiq1IrLtWuqbmSljVKe+AADgpvhc0vIHht 5vKU0aljQp2JbFcLJNuUL7XpyxwkZxD5Hn2VNEfOvBblGvnE9XB5wdApgebDKug4Q+ME zXNgcCrfX4ZqCHiaIi3yxFGUNuWJzjtdUKVLfH9Bb/m9SiTzKGChuLfndMq29qxtD/6E btTA== 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:in-reply-to :references; bh=JJdgGNmD+Xij1ICoEW9/1LslSZLxJsuLiu6yxyxEF/g=; b=JcqVSQNEnvwmLSrzhbmUB2EkwjSwReZfxQViYKn/LSyjhTXgLX2jYtSkbsnY2IBo7D ou9X3hWM2waDaE+nSt9bfo2rD9WN2Pvo9hB3qMWp9bvf1FFJ7nEMAftRkZay21oNmlAE vtV2or+kcDDtQKxSYr7UlS5QxULA3vRPOHo1u4XtKWJW4KtX+K3esi6liWsrLj7vpyvN FKmdJj33bGjTL6q5pZdvUjtvJyHP72QKuqGJhBRZ00H0omtZWbtr3OQzTWwsxHXwQbFU ZlEyai6VY36vCdf3zeMnZ/YXm1kJ72rhs704DUpjaEi2wiFJizwCqCIipJTNjutw9wQT Wa2A== X-Gm-Message-State: AOAM533GVJ0uR5/iUsQ+lWyipZ7/kkdV7Ck4xcoTHbFLsPE7MGAPlTvO R0VFamQP5TZwdC4BNSiGmio7cNyU X-Google-Smtp-Source: ABdhPJw/eCqPIyFq7u6VFY+r7QtUPluE24wCua/J87yYwHX4NoIHbHJ1piWNpLzryn7bPA0c/cd0mA== X-Received: by 2002:a5d:604b:: with SMTP id j11mr5335643wrt.193.1591720131314; Tue, 09 Jun 2020 09:28:51 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:50 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 16/20] target/mips: fpu: Remove now unused FLOAT_RINT macro Date: Tue, 9 Jun 2020 18:28:34 +0200 Message-Id: <1591720118-7378-17-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing RINT., this macro is not needed anymore. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-15-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index dae1331..56ba491 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1102,19 +1102,6 @@ uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) return ((uint64_t)fsth2 << 32) | fst2; } -#define FLOAT_RINT(name, bits) \ -uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ - uint ## bits ## _t fs) \ -{ \ - uint ## bits ## _t fdret; \ - \ - fdret = float ## bits ## _round_to_int(fs, &env->active_fpu.fp_status); \ - update_fcr31(env, GETPC()); \ - return fdret; \ -} - -#undef FLOAT_RINT - uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) { uint64_t fdret; From patchwork Tue Jun 9 16:28:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596131 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1104C913 for ; Tue, 9 Jun 2020 16:50:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA2B520737 for ; Tue, 9 Jun 2020 16:50:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tsT/y826" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA2B520737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihS5-00022s-VT for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:50:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7S-0006MJ-7h for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:58 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7N-00019D-Ox for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:57 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x6so21962091wrm.13 for ; Tue, 09 Jun 2020 09:28:53 -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:in-reply-to:references; bh=VcvK8/pVmCVF8v3SRJSD6aLnpQpjp2swimadybR8LKc=; b=tsT/y8263qvR9zeJXXMOEbeyy+DHY2dL316zbmbZu/rfSJrQrYxR3iQWcOhRup+MdI nmFkeIPW5m/SAXUwsyHlapTDvW8KeUd51Rmrk1uichmqhfbOQZwFdupBqyq3ikFJVIxN 150qZP8hjfYwQ1XPlIr8dxTYeyQNNLBPXgF2zbqhJRHuh+Y8ZRn3u7ln2iyuF2+S4hf/ QCeQk5hbsxuWFMk99rjlk/7pyQH7esUALXrgXVmuIZeeIH1L9gm9dNH1kG7bM509BidA 6nDJE1uckuiiUL+rDlkJ7YFesikO83F9qgGxFZ7U8jZfwp+e3m8XpTxYrfAGBULIxFw1 Q0dQ== 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:in-reply-to :references; bh=VcvK8/pVmCVF8v3SRJSD6aLnpQpjp2swimadybR8LKc=; b=iOrgRZcURvpwcSJhggkAtZRWhgU5fXxYS0Y3UOkQ+GENZo4DrJBHDgiCv47vorCThA /3jOcqMCeZ9Sqka2Nd2ij15q6bhQZYaEsYyzyOWZHMssZQ4/7BgA47zUcWDmVfHT1MUq o85SPZrcoXnwwpoPg9Th9IaH9n5CBcIWNC6Wgf+zRWJgzMo/jz/4ACiZVazA5ViYKoM/ nFHgibqCSS0b7B/PJeBbIIyDvuI6HySg5rxkJnplptnzeAaxQLRE7JI2pJWBktaGND1E AikQo5a/PEyN9VHtE7rCciwuCBOhhcQGvOz7gR1meHYrW3HZMY8d1npI7NrjROTvLS+K i89A== X-Gm-Message-State: AOAM532K0DltArf/A0D8j8GgFJhx1NXxE14Y+BB0wnJ/eig2+BhK5T41 S/kuq9EvyeUU+8OXKU5xNW0Phg6x X-Google-Smtp-Source: ABdhPJyxvtjrAK1orfFXBo+ot+2tekyBVN+k+jZbS4E+m7Xxv14PmpYWb1I34XetemFfo2KI/xhNFQ== X-Received: by 2002:adf:f4c6:: with SMTP id h6mr5553653wrp.398.1591720132190; Tue, 09 Jun 2020 09:28:52 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:51 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 17/20] target/mips: fpu: Name better paired-single variables Date: Tue, 9 Jun 2020 18:28:35 +0200 Message-Id: <1591720118-7378-18-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use consistently 'l' and 'h' for low and high halves. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-16-aleksandar.qemu.devel@gmail.com> --- target/mips/fpu_helper.c | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 56ba491..dbb8ca5 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1059,14 +1059,14 @@ uint32_t helper_float_recip1_s(CPUMIPSState *env, uint32_t fst0) uint64_t helper_float_recip1_ps(CPUMIPSState *env, uint64_t fdt0) { - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_div(float32_one, fdt0 & 0XFFFFFFFF, - &env->active_fpu.fp_status); + fstl2 = float32_div(float32_one, fdt0 & 0XFFFFFFFF, + &env->active_fpu.fp_status); fsth2 = float32_div(float32_one, fdt0 >> 32, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rsqrt1_d(CPUMIPSState *env, uint64_t fdt0) @@ -1091,15 +1091,15 @@ uint32_t helper_float_rsqrt1_s(CPUMIPSState *env, uint32_t fst0) uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) { - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_sqrt(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); + fstl2 = float32_sqrt(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); fsth2 = float32_sqrt(fdt0 >> 32, &env->active_fpu.fp_status); - fst2 = float32_div(float32_one, fst2, &env->active_fpu.fp_status); + fstl2 = float32_div(float32_one, fstl2, &env->active_fpu.fp_status); fsth2 = float32_div(float32_one, fsth2, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) @@ -1367,19 +1367,19 @@ uint32_t helper_float_recip2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) uint64_t helper_float_recip2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst2 = fdt2 & 0XFFFFFFFF; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; uint32_t fsth2 = fdt2 >> 32; - fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); - fst2 = float32_chs(float32_sub(fst2, float32_one, + fstl2 = float32_chs(float32_sub(fstl2, float32_one, &env->active_fpu.fp_status)); fsth2 = float32_chs(float32_sub(fsth2, float32_one, &env->active_fpu.fp_status)); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rsqrt2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) @@ -1404,51 +1404,51 @@ uint32_t helper_float_rsqrt2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) uint64_t helper_float_rsqrt2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst2 = fdt2 & 0XFFFFFFFF; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; uint32_t fsth2 = fdt2 >> 32; - fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); - fst2 = float32_sub(fst2, float32_one, &env->active_fpu.fp_status); + fstl2 = float32_sub(fstl2, float32_one, &env->active_fpu.fp_status); fsth2 = float32_sub(fsth2, float32_one, &env->active_fpu.fp_status); - fst2 = float32_chs(float32_div(fst2, FLOAT_TWO32, + fstl2 = float32_chs(float32_div(fstl2, FLOAT_TWO32, &env->active_fpu.fp_status)); fsth2 = float32_chs(float32_div(fsth2, FLOAT_TWO32, &env->active_fpu.fp_status)); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_addr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst1 = fdt1 & 0XFFFFFFFF; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; uint32_t fsth1 = fdt1 >> 32; - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_add(fst0, fsth0, &env->active_fpu.fp_status); - fsth2 = float32_add(fst1, fsth1, &env->active_fpu.fp_status); + fstl2 = float32_add(fstl0, fsth0, &env->active_fpu.fp_status); + fsth2 = float32_add(fstl1, fsth1, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_mulr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst1 = fdt1 & 0XFFFFFFFF; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; uint32_t fsth1 = fdt1 >> 32; - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_mul(fst0, fsth0, &env->active_fpu.fp_status); - fsth2 = float32_mul(fst1, fsth1, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fsth0, &env->active_fpu.fp_status); + fsth2 = float32_mul(fstl1, fsth1, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } #define FLOAT_MINMAX(name, bits, minmaxfunc) \ From patchwork Tue Jun 9 16:28:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596137 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68D2D913 for ; Tue, 9 Jun 2020 16:52:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DEE620737 for ; Tue, 9 Jun 2020 16:52:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="maLLnFDR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DEE620737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihTj-0004GG-BX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7Q-0006IU-F4 for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:56 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7P-00019M-5X for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:56 -0400 Received: by mail-wm1-x342.google.com with SMTP id q25so3819640wmj.0 for ; Tue, 09 Jun 2020 09:28:54 -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:in-reply-to:references; bh=M4fK9e7nonTg8xmTj7bNTrIqK8wplkmoX96IkPP42wA=; b=maLLnFDRkM9jsoyZDUt/raBajde+f6kf3iSDwWj89u/03+pPKYlxw7bzlmV0kUz3PS T14zOEFgUPd138AWWEQ997VBHE6zagtIQCY46+C8Kuy74N1XtzzAbJLM+UHU467nve2w Z4PJbq2Aj7Xtxv4ZTE7aSv681c3dWQpjYpVmJ4kXBGXK/BH0dA5BqG87ANZUHN/Q3oJn AAK5/xkCKAHX8rMlAbOOfhC/O5ZRwt6yd4W6e8oXjcP9DbaySOafhYv5be6jlj9K2X0i sbdoRO2g0Bi2vi8noweL2hIFZ5nOzIWGI9SkI5PsQOg5jkcPR+5qG//6TREJT05lLsM3 zl3g== 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:in-reply-to :references; bh=M4fK9e7nonTg8xmTj7bNTrIqK8wplkmoX96IkPP42wA=; b=FBV29ieOjjbigKJc5I3/9WO+PyMulM1UpfwOMbOrz6L54/A3ZV0Kg98ofOjtyfrzLO AV39D9uTnoYzR7yL0K7wNLA+8sT88zg0/kBDhk2+nduTxu7i6aMGtJbf+VErysCfxTIH JyFGUsOn6fb5/iXi41IWHsUbYlOKth8bLQzucQpMll9nsu3YjF72oJbNZgTA1FSCQszi CxhXP497yPajwj+QU+TgdAyKJ2Va2Tlc7VwF7OvwUkG6TWi0NaRVfeJC1w31UuVN5TE6 wCJlh+VuOBSt+weEUMYaROB8aQgiWkxE87l0DheK9VrBFjveHmYink8oLW5t9aBRJp/0 MjQQ== X-Gm-Message-State: AOAM530/hG0dNh7NmjZcodoEkPZs4Y2lfABMp+ZAho29HXSJ8o7Rih4e bM1sC3xl76DxF9Lgi5qdmZbnaSbi X-Google-Smtp-Source: ABdhPJwuySOg27hCSsCTynlWTVd2Iq2gUisy+r7UzECPOd0bGqEhmkC6FFmW5W86IXqAk1WU/3MUDA== X-Received: by 2002:a1c:63c2:: with SMTP id x185mr4963961wmb.68.1591720132932; Tue, 09 Jun 2020 09:28:52 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:52 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 18/20] target/mips: fpu: Refactor conversion from ieee to mips exception flags Date: Tue, 9 Jun 2020 18:28:36 +0200 Message-Id: <1591720118-7378-19-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The original coversion function is used for regular and MSA floating point instructions handling. Since there are some nuanced differences between regular and MSA floating point exception handling, provide two instances of the conversion function, rather than just a single common one. Inline both instances of this function instances for the sake of performance. Improve variable naming in surrounding code for clarity. Reviewed-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Message-Id: <20200518200920.17344-17-aleksandar.qemu.devel@gmail.com> --- target/mips/internal.h | 1 - target/mips/fpu_helper.c | 55 ++++++++++++++++++---------------- target/mips/msa_helper.c | 77 ++++++++++++++++++++++++++++++++---------------- 3 files changed, 82 insertions(+), 51 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 1bf274b..684356e 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -224,7 +224,6 @@ uint32_t float_class_s(uint32_t arg, float_status *fst); uint64_t float_class_d(uint64_t arg, float_status *fst); extern unsigned int ieee_rm[]; -int ieee_ex_to_mips(int xcpt); void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask); static inline void restore_rounding_mode(CPUMIPSState *env) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index dbb8ca5..7a3a61c 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -189,43 +189,48 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt) } } -int ieee_ex_to_mips(int xcpt) +static inline int ieee_to_mips_xcpt(int ieee_xcpt) { - int ret = 0; - if (xcpt) { - if (xcpt & float_flag_invalid) { - ret |= FP_INVALID; - } - if (xcpt & float_flag_overflow) { - ret |= FP_OVERFLOW; - } - if (xcpt & float_flag_underflow) { - ret |= FP_UNDERFLOW; - } - if (xcpt & float_flag_divbyzero) { - ret |= FP_DIV0; - } - if (xcpt & float_flag_inexact) { - ret |= FP_INEXACT; - } + int mips_xcpt = 0; + + if (ieee_xcpt & float_flag_invalid) { + mips_xcpt |= FP_INVALID; + } + if (ieee_xcpt & float_flag_overflow) { + mips_xcpt |= FP_OVERFLOW; } - return ret; + if (ieee_xcpt & float_flag_underflow) { + mips_xcpt |= FP_UNDERFLOW; + } + if (ieee_xcpt & float_flag_divbyzero) { + mips_xcpt |= FP_DIV0; + } + if (ieee_xcpt & float_flag_inexact) { + mips_xcpt |= FP_INEXACT; + } + + return mips_xcpt; } static inline void update_fcr31(CPUMIPSState *env, uintptr_t pc) { - int tmp = ieee_ex_to_mips(get_float_exception_flags( - &env->active_fpu.fp_status)); + int ieee_exception_flags = get_float_exception_flags( + &env->active_fpu.fp_status); + int mips_exception_flags = 0; + + if (ieee_exception_flags) { + mips_exception_flags = ieee_to_mips_xcpt(ieee_exception_flags); + } - SET_FP_CAUSE(env->active_fpu.fcr31, tmp); + SET_FP_CAUSE(env->active_fpu.fcr31, mips_exception_flags); - if (tmp) { + if (mips_exception_flags) { set_float_exception_flags(0, &env->active_fpu.fp_status); - if (GET_FP_ENABLE(env->active_fpu.fcr31) & tmp) { + if (GET_FP_ENABLE(env->active_fpu.fcr31) & mips_exception_flags) { do_raise_exception(env, EXCP_FPE, pc); } else { - UPDATE_FP_FLAGS(env->active_fpu.fcr31, tmp); + UPDATE_FP_FLAGS(env->active_fpu.fcr31, mips_exception_flags); } } } diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 3c7012c..c3b2719 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -5419,54 +5419,81 @@ static inline void check_msacsr_cause(CPUMIPSState *env, uintptr_t retaddr) #define CLEAR_IS_INEXACT 2 #define RECIPROCAL_INEXACT 4 -static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) + +static inline int ieee_to_mips_xcpt_msa(int ieee_xcpt) { - int ieee_ex; + int mips_xcpt = 0; - int c; + if (ieee_xcpt & float_flag_invalid) { + mips_xcpt |= FP_INVALID; + } + if (ieee_xcpt & float_flag_overflow) { + mips_xcpt |= FP_OVERFLOW; + } + if (ieee_xcpt & float_flag_underflow) { + mips_xcpt |= FP_UNDERFLOW; + } + if (ieee_xcpt & float_flag_divbyzero) { + mips_xcpt |= FP_DIV0; + } + if (ieee_xcpt & float_flag_inexact) { + mips_xcpt |= FP_INEXACT; + } + + return mips_xcpt; +} + +static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) +{ + int ieee_exception_flags; + int mips_exception_flags = 0; int cause; int enable; - ieee_ex = get_float_exception_flags(&env->active_tc.msa_fp_status); + ieee_exception_flags = get_float_exception_flags( + &env->active_tc.msa_fp_status); /* QEMU softfloat does not signal all underflow cases */ if (denormal) { - ieee_ex |= float_flag_underflow; + ieee_exception_flags |= float_flag_underflow; + } + if (ieee_exception_flags) { + mips_exception_flags = ieee_to_mips_xcpt_msa(ieee_exception_flags); } - - c = ieee_ex_to_mips(ieee_ex); enable = GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED; /* Set Inexact (I) when flushing inputs to zero */ - if ((ieee_ex & float_flag_input_denormal) && + if ((ieee_exception_flags & float_flag_input_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) { if (action & CLEAR_IS_INEXACT) { - c &= ~FP_INEXACT; + mips_exception_flags &= ~FP_INEXACT; } else { - c |= FP_INEXACT; + mips_exception_flags |= FP_INEXACT; } } /* Set Inexact (I) and Underflow (U) when flushing outputs to zero */ - if ((ieee_ex & float_flag_output_denormal) && + if ((ieee_exception_flags & float_flag_output_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) { - c |= FP_INEXACT; + mips_exception_flags |= FP_INEXACT; if (action & CLEAR_FS_UNDERFLOW) { - c &= ~FP_UNDERFLOW; + mips_exception_flags &= ~FP_UNDERFLOW; } else { - c |= FP_UNDERFLOW; + mips_exception_flags |= FP_UNDERFLOW; } } /* Set Inexact (I) when Overflow (O) is not enabled */ - if ((c & FP_OVERFLOW) != 0 && (enable & FP_OVERFLOW) == 0) { - c |= FP_INEXACT; + if ((mips_exception_flags & FP_OVERFLOW) != 0 && + (enable & FP_OVERFLOW) == 0) { + mips_exception_flags |= FP_INEXACT; } /* Clear Exact Underflow when Underflow (U) is not enabled */ - if ((c & FP_UNDERFLOW) != 0 && (enable & FP_UNDERFLOW) == 0 && - (c & FP_INEXACT) == 0) { - c &= ~FP_UNDERFLOW; + if ((mips_exception_flags & FP_UNDERFLOW) != 0 && + (enable & FP_UNDERFLOW) == 0 && + (mips_exception_flags & FP_INEXACT) == 0) { + mips_exception_flags &= ~FP_UNDERFLOW; } /* @@ -5474,11 +5501,11 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * divide by zero */ if ((action & RECIPROCAL_INEXACT) && - (c & (FP_INVALID | FP_DIV0)) == 0) { - c = FP_INEXACT; + (mips_exception_flags & (FP_INVALID | FP_DIV0)) == 0) { + mips_exception_flags = FP_INEXACT; } - cause = c & enable; /* all current enabled exceptions */ + cause = mips_exception_flags & enable; /* all current enabled exceptions */ if (cause == 0) { /* @@ -5486,7 +5513,7 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * with all current exceptions */ SET_FP_CAUSE(env->active_tc.msacsr, - (GET_FP_CAUSE(env->active_tc.msacsr) | c)); + (GET_FP_CAUSE(env->active_tc.msacsr) | mips_exception_flags)); } else { /* Current exceptions are enabled */ if ((env->active_tc.msacsr & MSACSR_NX_MASK) == 0) { @@ -5495,11 +5522,11 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * with all enabled exceptions */ SET_FP_CAUSE(env->active_tc.msacsr, - (GET_FP_CAUSE(env->active_tc.msacsr) | c)); + (GET_FP_CAUSE(env->active_tc.msacsr) | mips_exception_flags)); } } - return c; + return mips_exception_flags; } static inline int get_enabled_exceptions(const CPUMIPSState *env, int c) From patchwork Tue Jun 9 16:28:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596157 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59FE1913 for ; Tue, 9 Jun 2020 16:56:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FD912074B for ; Tue, 9 Jun 2020 16:56:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hAeEDz+y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FD912074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihXx-0003BD-9d for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:56:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7R-0006L9-Os for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:57 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:44801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7P-00019O-Dv for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:57 -0400 Received: by mail-wr1-x430.google.com with SMTP id y17so22001805wrn.11 for ; Tue, 09 Jun 2020 09:28:54 -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:in-reply-to:references; bh=wv2KqLsKtLWgYn/F47Dsu5RFT4XbMRK8m6vgpFpr7eM=; b=hAeEDz+yjEFxVDWqP/fo4y91j4/JEk+eu2Su7j1t/iY5djZ9N4OTeul1VSFIBaDrKc M+7ggmGsmMZ+gfgAxmKT8bggrDm1QstfNTKjlxsP/QrhCLEangw/Q7+7hy2EQKeDM15u dvw4vei5XfoDueBsUA3H6Wge9fiZ6WhYdnQ75Iy3omVbOIhzvHVlyHnmA11FefJoOhfk SZ5NUJuwr0KVtLAW4OrAyxr8Rg8bbgBy2GcHFi+bRc66N2kw74MfvcV+T6NTpohMsdcj DXEDrfcDERpN43j+C+Ntyjy1WGfD9P8in04ICC5im2wBlFv4KHFp0UtswS3lPWT1WLvX Aq8g== 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:in-reply-to :references; bh=wv2KqLsKtLWgYn/F47Dsu5RFT4XbMRK8m6vgpFpr7eM=; b=Xwrsmm/0Y9ERxvkpjbHKMyR3nd363ln7gEV90L1gbfysYYHhyVghNh0S26lFPAjE0C R1al2uLc0gimjmY3Kc5H8E7SC695XDXlv9r/8D4XSWy+Ir2tA6E9v+w//EB3baD8TD5Z /HZ7Cc5Yx++3tCJ3pGbMjEWCEN8oCnAcY2Iv9m8908aUY0CaU+nstJzWrbEUrI2C276F xYEZPX56HZPbPFW5jY49bdmfB7iScurF2hZxbBqehuGa7N1IgfQD1Tup7C5QC8ijx+tL UbxhfjpriBmYZYBiB6BGmCggmjT3ms+hVRcZdVEaNhf9ac4D7emwZrG4uPPf3LUOpM7L EnUw== X-Gm-Message-State: AOAM5336EK+na9VAGY19PTgi+dgr4O8s5LSUbGfN9OzLCL+idtSmw/Te cFi8/IIJMq2Qfo5YPF1GyWhtL3XD X-Google-Smtp-Source: ABdhPJx1OlFi4u9uRgY9nZXk/C4zwtZ4e28TZtAnh5z0cDVLcbtCORN1UrTW9IMmbDQpcrKw3gfzbg== X-Received: by 2002:adf:f582:: with SMTP id f2mr5833636wro.204.1591720133678; Tue, 09 Jun 2020 09:28:53 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:53 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 19/20] target/mips: Add Loongson-3 CPU definition Date: Tue, 9 Jun 2020 18:28:37 +0200 Message-Id: <1591720118-7378-20-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while Loongson-3A R4 is the newest and its ISA is almost the superset of all others. To reduce complexity, we just define two CPU types: 1) "Loongson-3A1000" CPU which is corresponding to Loongson-3A R1. It is suitable for TCG because Loongson-3A R1 has fewest ASE. 2) "Loongson-3A4000" CPU which is corresponding to Loongson-3A R4. It is suitable for KVM because Loongson-3A R4 has the VZ ASE. Loongson-3A has CONFIG6 and CONFIG7, so add their bit-fields as well. [AM: Rearranged insn_flags, added comments, renamed lmi_helper.c, improved commit message, fixed checkpatch warnings] Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: <1591065557-9174-3-git-send-email-chenhc@lemote.com> --- target/mips/cpu.h | 32 ++++++++++- target/mips/internal.h | 2 + target/mips/mips-defs.h | 45 ++++++++------- target/mips/{lmi_helper.c => lmmi_helper.c} | 0 target/mips/translate.c | 2 + target/mips/translate_init.inc.c | 86 +++++++++++++++++++++++++++++ target/mips/Makefile.objs | 2 +- 7 files changed, 146 insertions(+), 23 deletions(-) rename target/mips/{lmi_helper.c => lmmi_helper.c} (100%) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 94d01ea..7cf7f52 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -198,8 +198,8 @@ typedef struct mips_def_t mips_def_t; * 3 Config3 WatchLo3 WatchHi * 4 Config4 WatchLo4 WatchHi * 5 Config5 WatchLo5 WatchHi - * 6 WatchLo6 WatchHi - * 7 WatchLo7 WatchHi + * 6 Config6 WatchLo6 WatchHi + * 7 Config7 WatchLo7 WatchHi * * * Register 20 Register 21 Register 22 Register 23 @@ -940,7 +940,35 @@ struct CPUMIPSState { #define CP0C5_UFR 2 #define CP0C5_NFExists 0 int32_t CP0_Config6; + int32_t CP0_Config6_rw_bitmask; +#define CP0C6_BPPASS 31 +#define CP0C6_KPOS 24 +#define CP0C6_KE 23 +#define CP0C6_VTLBONLY 22 +#define CP0C6_LASX 21 +#define CP0C6_SSEN 20 +#define CP0C6_DISDRTIME 19 +#define CP0C6_PIXNUEN 18 +#define CP0C6_SCRAND 17 +#define CP0C6_LLEXCEN 16 +#define CP0C6_DISVC 15 +#define CP0C6_VCLRU 14 +#define CP0C6_DCLRU 13 +#define CP0C6_PIXUEN 12 +#define CP0C6_DISBLKLYEN 11 +#define CP0C6_UMEMUALEN 10 +#define CP0C6_SFBEN 8 +#define CP0C6_FLTINT 7 +#define CP0C6_VLTINT 6 +#define CP0C6_DISBTB 5 +#define CP0C6_STPREFCTL 2 +#define CP0C6_INSTPREF 1 +#define CP0C6_DATAPREF 0 int32_t CP0_Config7; + int64_t CP0_Config7_rw_bitmask; +#define CP0C7_NAPCGEN 2 +#define CP0C7_UNIMUEN 1 +#define CP0C7_VFPUCGEN 0 uint64_t CP0_LLAddr; uint64_t CP0_MAAR[MIPS_MAAR_MAX]; int32_t CP0_MAARI; diff --git a/target/mips/internal.h b/target/mips/internal.h index 684356e..7f159a9 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -36,7 +36,9 @@ struct mips_def_t { int32_t CP0_Config5; int32_t CP0_Config5_rw_bitmask; int32_t CP0_Config6; + int32_t CP0_Config6_rw_bitmask; int32_t CP0_Config7; + int32_t CP0_Config7_rw_bitmask; target_ulong CP0_LLAddr_rw_bitmask; int CP0_LLAddr_shift; int32_t SYNCI_Step; diff --git a/target/mips/mips-defs.h b/target/mips/mips-defs.h index a831bb4..0c12910 100644 --- a/target/mips/mips-defs.h +++ b/target/mips/mips-defs.h @@ -15,7 +15,7 @@ * ------------------------------------------------ */ /* - * bits 0-31: MIPS base instruction sets + * bits 0-23: MIPS base instruction sets */ #define ISA_MIPS1 0x0000000000000001ULL #define ISA_MIPS2 0x0000000000000002ULL @@ -34,30 +34,33 @@ #define ISA_MIPS64R6 0x0000000000004000ULL #define ISA_NANOMIPS32 0x0000000000008000ULL /* - * bits 32-47: MIPS ASEs + * bits 24-39: MIPS ASEs */ -#define ASE_MIPS16 0x0000000100000000ULL -#define ASE_MIPS3D 0x0000000200000000ULL -#define ASE_MDMX 0x0000000400000000ULL -#define ASE_DSP 0x0000000800000000ULL -#define ASE_DSP_R2 0x0000001000000000ULL -#define ASE_DSP_R3 0x0000002000000000ULL -#define ASE_MT 0x0000004000000000ULL -#define ASE_SMARTMIPS 0x0000008000000000ULL -#define ASE_MICROMIPS 0x0000010000000000ULL -#define ASE_MSA 0x0000020000000000ULL +#define ASE_MIPS16 0x0000000001000000ULL +#define ASE_MIPS3D 0x0000000002000000ULL +#define ASE_MDMX 0x0000000004000000ULL +#define ASE_DSP 0x0000000008000000ULL +#define ASE_DSP_R2 0x0000000010000000ULL +#define ASE_DSP_R3 0x0000000020000000ULL +#define ASE_MT 0x0000000040000000ULL +#define ASE_SMARTMIPS 0x0000000080000000ULL +#define ASE_MICROMIPS 0x0000000100000000ULL +#define ASE_MSA 0x0000000200000000ULL /* - * bits 48-55: vendor-specific base instruction sets + * bits 40-51: vendor-specific base instruction sets */ -#define INSN_LOONGSON2E 0x0001000000000000ULL -#define INSN_LOONGSON2F 0x0002000000000000ULL -#define INSN_VR54XX 0x0004000000000000ULL -#define INSN_R5900 0x0008000000000000ULL +#define INSN_VR54XX 0x0000010000000000ULL +#define INSN_R5900 0x0000020000000000ULL +#define INSN_LOONGSON2E 0x0000040000000000ULL +#define INSN_LOONGSON2F 0x0000080000000000ULL +#define INSN_LOONGSON3A 0x0000100000000000ULL /* - * bits 56-63: vendor-specific ASEs + * bits 52-63: vendor-specific ASEs */ -#define ASE_MMI 0x0100000000000000ULL -#define ASE_MXU 0x0200000000000000ULL +#define ASE_MMI 0x0010000000000000ULL +#define ASE_MXU 0x0020000000000000ULL +#define ASE_LMMI 0x0040000000000000ULL +#define ASE_LEXT 0x0080000000000000ULL /* MIPS CPU defines. */ #define CPU_MIPS1 (ISA_MIPS1) @@ -94,6 +97,8 @@ /* Wave Computing: "nanoMIPS" */ #define CPU_NANOMIPS32 (CPU_MIPS32R6 | ISA_NANOMIPS32) +#define CPU_LOONGSON3A (CPU_MIPS64R2 | INSN_LOONGSON3A) + /* * Strictly follow the architecture standard: * - Disallow "special" instruction handling for PMON/SPIM. diff --git a/target/mips/lmi_helper.c b/target/mips/lmmi_helper.c similarity index 100% rename from target/mips/lmi_helper.c rename to target/mips/lmmi_helper.c diff --git a/target/mips/translate.c b/target/mips/translate.c index 25b595a..2caf4cb 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -31206,7 +31206,9 @@ void cpu_state_reset(CPUMIPSState *env) env->CP0_Config5 = env->cpu_model->CP0_Config5; env->CP0_Config5_rw_bitmask = env->cpu_model->CP0_Config5_rw_bitmask; env->CP0_Config6 = env->cpu_model->CP0_Config6; + env->CP0_Config6_rw_bitmask = env->cpu_model->CP0_Config6_rw_bitmask; env->CP0_Config7 = env->cpu_model->CP0_Config7; + env->CP0_Config7_rw_bitmask = env->cpu_model->CP0_Config7_rw_bitmask; env->CP0_LLAddr_rw_bitmask = env->cpu_model->CP0_LLAddr_rw_bitmask << env->cpu_model->CP0_LLAddr_shift; env->CP0_LLAddr_shift = env->cpu_model->CP0_LLAddr_shift; diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.inc.c index 6d145a9..ffae10d 100644 --- a/target/mips/translate_init.inc.c +++ b/target/mips/translate_init.inc.c @@ -802,6 +802,92 @@ const mips_def_t mips_defs[] = .mmu_type = MMU_TYPE_R4000, }, { + .name = "Loongson-3A1000", + .CP0_PRid = 0x6305, + /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ + .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (63 << CP0C1_MMU) | + (3 << CP0C1_IS) | (4 << CP0C1_IL) | (3 << CP0C1_IA) | + (3 << CP0C1_DS) | (4 << CP0C1_DL) | (3 << CP0C1_DA) | + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP), + .CP0_Config2 = MIPS_CONFIG2 | (7 << CP0C2_SS) | (4 << CP0C2_SL) | + (3 << CP0C2_SA), + .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_LPA), + .CP0_LLAddr_rw_bitmask = 0, + .SYNCI_Step = 32, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x74D8FFFF, + .CP0_PageGrain = (1 << CP0PG_ELPA), + .CP0_PageGrain_rw_bitmask = (1 << CP0PG_ELPA), + .CP1_fcr0 = (0x5 << FCR0_PRID) | (0x1 << FCR0_REV) | (0x1 << FCR0_F64) | + (0x1 << FCR0_PS) | (0x1 << FCR0_L) | (0x1 << FCR0_W) | + (0x1 << FCR0_D) | (0x1 << FCR0_S), + .CP1_fcr31 = 0, + .CP1_fcr31_rw_bitmask = 0xFF83FFFF, + .SEGBITS = 42, + .PABITS = 48, + .insn_flags = CPU_LOONGSON3A, + .mmu_type = MMU_TYPE_R4000, + }, + { + .name = "Loongson-3A4000", + .CP0_PRid = 0x14C000, + /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ + .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (63 << CP0C1_MMU) | + (2 << CP0C1_IS) | (5 << CP0C1_IL) | (3 << CP0C1_IA) | + (2 << CP0C1_DS) | (5 << CP0C1_DL) | (3 << CP0C1_DA) | + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP), + .CP0_Config2 = MIPS_CONFIG2 | (5 << CP0C2_SS) | (5 << CP0C2_SL) | + (15 << CP0C2_SA), + .CP0_Config3 = MIPS_CONFIG3 | (1U << CP0C3_M) | (1 << CP0C3_MSAP) | + (1 << CP0C3_BP) | (1 << CP0C3_BI) | (1 << CP0C3_ULRI) | + (1 << CP0C3_RXI) | (1 << CP0C3_LPA) | (1 << CP0C3_VInt), + .CP0_Config4 = MIPS_CONFIG4 | (1U << CP0C4_M) | (2 << CP0C4_IE) | + (1 << CP0C4_AE) | (0x1c << CP0C4_KScrExist), + .CP0_Config4_rw_bitmask = 0, + .CP0_Config5 = MIPS_CONFIG5 | (1 << CP0C5_CRCP) | (1 << CP0C5_NFExists), + .CP0_Config5_rw_bitmask = (1 << CP0C5_K) | (1 << CP0C5_CV) | + (1 << CP0C5_MSAEn) | (1 << CP0C5_UFE) | + (1 << CP0C5_FRE) | (1 << CP0C5_SBRI), + .CP0_Config6 = (1 << CP0C6_VCLRU) | (1 << CP0C6_DCLRU) | + (1 << CP0C6_SFBEN) | (1 << CP0C6_VLTINT) | + (1 << CP0C6_INSTPREF) | (1 << CP0C6_DATAPREF), + .CP0_Config6_rw_bitmask = (1 << CP0C6_BPPASS) | (0x3f << CP0C6_KPOS) | + (1 << CP0C6_KE) | (1 << CP0C6_VTLBONLY) | + (1 << CP0C6_LASX) | (1 << CP0C6_SSEN) | + (1 << CP0C6_DISDRTIME) | (1 << CP0C6_PIXNUEN) | + (1 << CP0C6_SCRAND) | (1 << CP0C6_LLEXCEN) | + (1 << CP0C6_DISVC) | (1 << CP0C6_VCLRU) | + (1 << CP0C6_DCLRU) | (1 << CP0C6_PIXUEN) | + (1 << CP0C6_DISBLKLYEN) | (1 << CP0C6_UMEMUALEN) | + (1 << CP0C6_SFBEN) | (1 << CP0C6_FLTINT) | + (1 << CP0C6_VLTINT) | (1 << CP0C6_DISBTB) | + (3 << CP0C6_STPREFCTL) | (1 << CP0C6_INSTPREF) | + (1 << CP0C6_DATAPREF), + .CP0_Config7 = 0, + .CP0_Config7_rw_bitmask = (1 << CP0C7_NAPCGEN) | (1 << CP0C7_UNIMUEN) | + (1 << CP0C7_VFPUCGEN), + .CP0_LLAddr_rw_bitmask = 1, + .SYNCI_Step = 16, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x7DDBFFFF, + .CP0_PageGrain = (1 << CP0PG_ELPA), + .CP0_PageGrain_rw_bitmask = (1U << CP0PG_RIE) | (1 << CP0PG_XIE) | + (1 << CP0PG_ELPA) | (1 << CP0PG_IEC), + .CP1_fcr0 = (0x5 << FCR0_PRID) | (0x1 << FCR0_REV) | (0x1 << FCR0_F64) | + (0x1 << FCR0_PS) | (0x1 << FCR0_L) | (0x1 << FCR0_W) | + (0x1 << FCR0_D) | (0x1 << FCR0_S), + .CP1_fcr31 = 0, + .CP1_fcr31_rw_bitmask = 0xFF83FFFF, + .SEGBITS = 48, + .PABITS = 48, + .insn_flags = CPU_LOONGSON3A, + .mmu_type = MMU_TYPE_R4000, + }, + { /* A generic CPU providing MIPS64 DSP R2 ASE features. FIXME: Eventually this should be replaced by a real CPU model. */ .name = "mips64dspr2", diff --git a/target/mips/Makefile.objs b/target/mips/Makefile.objs index 91eb691..b820b3b 100644 --- a/target/mips/Makefile.objs +++ b/target/mips/Makefile.objs @@ -1,6 +1,6 @@ obj-y += translate.o cpu.o gdbstub.o helper.o obj-y += op_helper.o cp0_helper.o fpu_helper.o -obj-y += dsp_helper.o lmi_helper.o msa_helper.o +obj-y += dsp_helper.o lmmi_helper.o msa_helper.o obj-$(CONFIG_SOFTMMU) += mips-semi.o obj-$(CONFIG_SOFTMMU) += machine.o cp0_timer.o obj-$(CONFIG_KVM) += kvm.o From patchwork Tue Jun 9 16:28:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11596139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E567913 for ; Tue, 9 Jun 2020 16:52:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3B9A20737 for ; Tue, 9 Jun 2020 16:52:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tYBvI8NF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3B9A20737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jihUZ-0005oE-3J for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Jun 2020 12:52:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jih7S-0006Nb-Qp for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:58 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:34139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jih7Q-00019d-Nm for qemu-devel@nongnu.org; Tue, 09 Jun 2020 12:28:58 -0400 Received: by mail-wm1-x32b.google.com with SMTP id u26so2699305wmn.1 for ; Tue, 09 Jun 2020 09:28:56 -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:in-reply-to:references; bh=ujyzI6PK0Cj6j4urUhXNN+eZBMUkCinKRwasIhMry7Y=; b=tYBvI8NFC6+km618S04H3zY1pO0ZmBk4SSzPPG+mMKeaexAmOeGPobWr/hH5taea35 Q1w2ughvbZ35l1Ks6LaolJ6GSlJ3qJ2m+SojEiK8ARbi7g80xxIKu3t56HiMF26RxwfF ZZxwT/fB2rVTT77iBKbNge3Gt4Pz0eHE53G7IIuv1A4FVTzoG1019nniyPGARxrg+V/m BNLl8txQXEhWn0UZvYuEPzf8OfzfTPJzJmRRS8wGU5VYFBmA0pr69zY/JHccn1zT4aLq 1sRXGujAIMbmkmiBCZkD3jLze4XvVjrgvgx5hAngOgwAGc6dGbGNBnEJmTqIDuZhuuqB 9N6A== 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:in-reply-to :references; bh=ujyzI6PK0Cj6j4urUhXNN+eZBMUkCinKRwasIhMry7Y=; b=Zk0FC0HTuRz9jfeySrA29NrT+Hk04+LS3Rnni1U+J7EqXeuZEtvBJjEsigs9J+gI6Q b1q2Ha6OFY2BXtO2ERoTMoL60SMRo71zDzUr/UL1OKwdP3ihRb5EOt0/r7+bf8Zs16Ua 7F/F+fRg9V8KznnRmf5FJlfZ4OcNiWK8G5Git1O5GnqR3Qizs5JDvNhOKTls3zW3zv8g pNVO6O9IvLRdIcwh+3GIUvU3h3ozldkkV+f0LJQRnrZGyz+zwkNoVPhVnWfrGaoyl18u fcnygdjdMdmHfqTp/soOKVGQXufcs50Eu510l5PMj5miCTTweMq+kr5Qdz4Xzg6vm5kA hK1Q== X-Gm-Message-State: AOAM530mrOwBVW2SQQSBQvYfZAGxWImRYAOc7gSXc95tkuoczwHNoZIp q7SH39y1HdkniBGpFdtsw4T6V14y X-Google-Smtp-Source: ABdhPJx0R6EOXFDOMTxnCotQ8+Rap1fgOa2ArmV1pNmBEpyo3z8wCIlUVuAhTRpp7dfR9JxioHjpfQ== X-Received: by 2002:a1c:6243:: with SMTP id w64mr4778830wmb.162.1591720134255; Tue, 09 Jun 2020 09:28:54 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id 23sm3643598wmo.18.2020.06.09.09.28.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 09:28:53 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 20/20] target/mips: Enable hardware page table walker and CMGCR features for P5600 Date: Tue, 9 Jun 2020 18:28:38 +0200 Message-Id: <1591720118-7378-21-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1591720118-7378-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-wm1-x32b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aleksandar.qemu.devel@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Andrea Oliveri Enable hardware page table walker and CMGCR features for P5600 that supports both. Signed-off-by: Andrea Oliveri Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Message-Id: --- target/mips/translate_init.inc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/translate_init.inc.c b/target/mips/translate_init.inc.c index ffae10d..637cacc 100644 --- a/target/mips/translate_init.inc.c +++ b/target/mips/translate_init.inc.c @@ -366,7 +366,7 @@ const mips_def_t mips_defs[] = }, { /* FIXME: - * Config3: CMGCR, PW, VZ, CTXTC, CDMM, TL + * Config3: VZ, CTXTC, CDMM, TL * Config4: MMUExtDef * Config5: MRP * FIR(FCR0): Has2008 @@ -380,10 +380,11 @@ const mips_def_t mips_defs[] = (2 << CP0C1_DS) | (4 << CP0C1_DL) | (3 << CP0C1_DA) | (1 << CP0C1_PC) | (1 << CP0C1_FP), .CP0_Config2 = MIPS_CONFIG2, - .CP0_Config3 = MIPS_CONFIG3 | (1U << CP0C3_M) | (1 << CP0C3_MSAP) | + .CP0_Config3 = MIPS_CONFIG3 | (1U << CP0C3_M) | + (1 << CP0C3_CMGCR) | (1 << CP0C3_MSAP) | (1 << CP0C3_BP) | (1 << CP0C3_BI) | (1 << CP0C3_SC) | - (1 << CP0C3_ULRI) | (1 << CP0C3_RXI) | (1 << CP0C3_LPA) | - (1 << CP0C3_VInt), + (1 << CP0C3_PW) | (1 << CP0C3_ULRI) | (1 << CP0C3_RXI) | + (1 << CP0C3_LPA) | (1 << CP0C3_VInt), .CP0_Config4 = MIPS_CONFIG4 | (1U << CP0C4_M) | (2 << CP0C4_IE) | (0x1c << CP0C4_KScrExist), .CP0_Config4_rw_bitmask = 0,