From patchwork Wed May 13 10:52:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545759 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 A941F14C0 for ; Wed, 13 May 2020 10:54:26 +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 7E6E320675 for ; Wed, 13 May 2020 10:54:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OfXTKvPL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E6E320675 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]:33112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp1t-0001kg-Lv for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:54:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp13-0008NU-VK for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:33 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:46850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp13-0000Ob-8V for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:33 -0400 Received: by mail-lj1-x244.google.com with SMTP id f18so17230463lja.13 for ; Wed, 13 May 2020 03:53:32 -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=sYYgHAo2+EKZquY3ZxB7P+G7B9EmMHUqv6UWZNAADzw=; b=OfXTKvPLd/ojKh4idW3njmc/NOOublbKePYw/fltcWuufQd0QLVUXSVhmhlIdHiqSZ 8p55R+9om3Z1sPeV5xQtPtg4Djnt8t12JHvrFthLpKh94j42pzUkgKCQQ3IwYg3zExAI SVXDz2egXP7f65wK6dQTydUTv2tVwDC5fWx3m+PgkRbQP1s6wNbUBfUrHdIomOATiZzL 4b/KQkASHATUzxRMKR9mu48gaC0sfA4d+5EaYzVn+rxvO21Gr8WRuI8MR8DBujy/kbod PjwXbvYL/Mx1z6+mw06hUmo2lhj+J8U/Kq90LPbYlx3+ILDGLW6Lh0slUZcBtqu9agY/ IYJA== 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=sYYgHAo2+EKZquY3ZxB7P+G7B9EmMHUqv6UWZNAADzw=; b=sUGnaDHrU9hphm76PTHpT1vRgsJjOPaRQ1jlpME4T6+Q5tpqYGUfMBVI1el5EUrzmr MXcZQNwsrgr9d++kZQ3f8Hebb/MWbYnlRgklRjUW/1BeRVQFkO8fnY8U4Dgy1ETe2yk1 NLlrNWQ9ky7m7SE9SqwToe3CjJjEF1BKHj4mLltbX0DYutlLFPdcO4cQZTTAg1iipwIy EsXlbt4s9B02HFQBu80O7PQ5nHRR57JddQ3ObtrQgE/E94rXzsTU5WlVAymSuNQm/Wl0 Bw4CwA3rwTM4iQ+E6r+znffidKVOIKb49g1X7Tez/KbIkwZmirO9IQBcNmGcIZlZ4LiF jkww== X-Gm-Message-State: AOAM532NLiMAGXJY8ZOQqnFzv/AYMldKsvFQTodEXEOduhrYJ1a50RsY cGvSROln5enxTQD2bm13ZtGLRSsuAZQ= X-Google-Smtp-Source: ABdhPJxPIiSrYS6D2urY64wA4EfP6FNfv7Ma0PpiNxmudQpdMnuslJTiAsanvJdZFgf1YYdCKYyQLQ== X-Received: by 2002:a2e:5451:: with SMTP id y17mr1656905ljd.6.1589367211416; Wed, 13 May 2020 03:53:31 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:31 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 01/12] target/mips: fpu: Demacro ADD. Date: Wed, 13 May 2020 12:52:56 +0200 Message-Id: <20200513105307.22638-2-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x244.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 5287c86c61..984f3f4dfb 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 Wed May 13 10:52:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545761 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 15A15139F for ; Wed, 13 May 2020 10:54:29 +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 DCF2920675 for ; Wed, 13 May 2020 10:54:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qRKlFtG5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCF2920675 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]:33318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp1v-0001qI-S6 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:54:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp15-0008P8-CZ for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:35 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:42914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp14-0000Oi-K0 for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:35 -0400 Received: by mail-lj1-x241.google.com with SMTP id d21so9545060ljg.9 for ; Wed, 13 May 2020 03:53:34 -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=xJKvZWQFMn9VprRv2pADfNDp4/qI8q0H7WxNbnq8wtU=; b=qRKlFtG5IkZo2zOCc8e4YKYVwjv/R7KUvJUFPX1U4UH1VWr9efTgRVar36QGTMSvFT VCSCsrhqeXQrETlMXeRMoG6kka32zmj3TSVM+X0axvubn18clzdM6l5wW/88hiNEPg9c papc1lCfUXabkp39UvyuqKlrDS18erts5pZ/A42yjrAR3kBtbrtI07k++CkEYyr2+Q5r e7pmIH89NlteOPFY9/cxqdhvnG3jHINoeV+ocXXFzVIe52fNGn1af3TsC1Jrw1VzACkq iM8sIZ3IEeAoH7Jd7+880XP4XoMqERtedoW39fkpc0Nu5GVsVZg9AotIrfDbV30Upwo0 vO8A== 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=xJKvZWQFMn9VprRv2pADfNDp4/qI8q0H7WxNbnq8wtU=; b=lcjJjFTY+eYmT7qs3XPkOT6WIRDiEabaMrXlvpG2TlmOFp+rpqk68jvc4Unf9/I1RH t2mE/TANvUviA8hyspqpRXPD/duRrvPWY8AG0QA0DFSVfnxXPQ7ZvRCiUYhtAkbBTXAv M/JIHpfuZjXE5M/QFK1/1GR+dGGlRov8eNZE42fjGlp0IwH7+NyWmEOPhTIlECAyRVky 4vucWzs4sRZFZCw/K29RR7GJCCf4Dgpgw2c4Vj/rRMcNnE4AMoqAS4UZ3mzoTzy3iPk8 hE9f8DORbwKGBZFz3HSWnhmlB2UeJZQerQKQDtXRiC5ky/1jUwcv3FEavafNEYzhw3GY 6SeA== X-Gm-Message-State: AOAM530eGS9DtkY3Ky/YIWNHdyBYG8CGaOcH9MyZGIjENwr1R8rAo0Tj W2fXyDdY0YM+6dQ8kfVzEYGfrEo/S4Q= X-Google-Smtp-Source: ABdhPJx+H+mcyuvx9iiPGmjD+xgdU3AGwCTuDRnTvZC2Igq5L9miTMfSi508FFoEdgXlKEseJZ/dKg== X-Received: by 2002:a2e:8512:: with SMTP id j18mr17015305lji.201.1589367212836; Wed, 13 May 2020 03:53:32 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:32 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 02/12] target/mips: fpu: Demacro SUB. Date: Wed, 13 May 2020 12:52:57 +0200 Message-Id: <20200513105307.22638-3-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::241; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x241.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 984f3f4dfb..715a872cae 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 Wed May 13 10:52:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545767 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 A56EE14C0 for ; Wed, 13 May 2020 10:56:20 +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 7BE1520675 for ; Wed, 13 May 2020 10:56:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oACsxPnb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BE1520675 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]:41346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp3j-0005Tc-Kf for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:56:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp18-0008U7-1X for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:38 -0400 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:40414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp15-0000Op-SM for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:37 -0400 Received: by mail-lf1-x142.google.com with SMTP id u4so13217319lfm.7 for ; Wed, 13 May 2020 03:53:35 -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=Hp/YCDbUF4k/Qi0Hzps0dHG39YUDYzBviudtOCIRUBo=; b=oACsxPnbv784L+XT1d6OdBG4DUc1aw4HJeTPxcJFIOXR+ENAFyik+v577ZTF9qxgV3 xOqUBD00cdufxQWr4haX7yxup8fsVAXd2MLzXCKBNUmYESb4UfkbOTHxl9HGFBw4sOV+ yCr7VQjbel1kNaKnDDvhh8Kh3Hs/NF7ND18UNW+kpPte8o4YzE7VIOh1vVspuf6dLCsq ilqZJ1nY9Lw8d5qDguWpmUjMDL2c1g96Cfj/6PlHLGrIiyUJUrQViN1YtKnAbEvZ54C8 DRDS7lYOVaN+/+7wdTfUCSr8jZFdU+FBi7V3vLMWWA32xzm0VIHydL2zsw2TFa4RcVYk KcBw== 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=Hp/YCDbUF4k/Qi0Hzps0dHG39YUDYzBviudtOCIRUBo=; b=aqTd4FuatB0m7HVrDIGW6WqWBOk1ZurYGlYY6c9Iqn/EMxYC/WNPZO9NgVZgL8P/Aj fUh7PQfS9NqoSfe8Ao9vutG4NSzecG5eVoWCdI2ZAvJW+QmkB1crjNUQzQGStjGZwuDF kJ4J/nkt4wfz/5tvoEzzmOlFgJZwJTNIciDKFC45LT3Q9rpORVJJM7zgDXZzzvI7IfoH s9GtgHDU8nifzrirkuRK+nI92jaRubs5dgDNXRvOU6nFYqcYHlsmoozAs+VQT+t23HC/ M1GjqkmURz2vB4bVRO0q17Qc4xvUaYOPC8fPqsT4Ei7QUzV3l5fWCC64E92yybSVGGmH 2+wA== X-Gm-Message-State: AOAM532tvAkRBg+vtZPQVEpZGacB0puV7GZc7k+ZPygcjW3vygUJqtqQ YzD8LIV65BIjIzVf+c3uQ9pDZ2NlUpo= X-Google-Smtp-Source: ABdhPJwtzWRVeSMNaKEwyXnBOf3YyovEFUNMjKHpwejJ66FbksbM8u6QoEJkRERTsJNBY5bTRK7VSg== X-Received: by 2002:ac2:5046:: with SMTP id a6mr17512487lfm.103.1589367214134; Wed, 13 May 2020 03:53:34 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:33 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 03/12] target/mips: fpu: Demacro MUL. Date: Wed, 13 May 2020 12:52:58 +0200 Message-Id: <20200513105307.22638-4-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::142; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x142.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 715a872cae..449e945166 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 Wed May 13 10:52:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545771 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 B16FE139F for ; Wed, 13 May 2020 10:58:17 +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 5667A20675 for ; Wed, 13 May 2020 10:58:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tR1NLsNE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5667A20675 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]:48118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp5c-0008G0-0J for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:58:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp18-0008VO-L9 for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:38 -0400 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:34844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp17-0000Oy-MT for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:38 -0400 Received: by mail-lf1-x143.google.com with SMTP id x73so13229883lfa.2 for ; Wed, 13 May 2020 03:53:37 -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=u+u2GTLpTwv9NrMPHkakKvWn/ABYNzXl/Rjh49VH7qg=; b=tR1NLsNET1KOND1jVWrydTwAO5Tytz9Schs1DRaimaES0j1AT3+54TVhLEMdeyRYaM Z7TkUfd1LsDW2tjvARj2pF4SeszjSECFB4HUZNZHmjs9bh8j+iZVNdJs+fWmStX7nPA1 7U5/jEfFtTQK+/9Uw8VdFAI5a5v0bplTVJ+MDpqEagLSIrlDpq9uL1MnVTwHec9wwedx J1pDNRmXeXB4yBDrAGU2Irja1d7mzdVp3oaN/UYDo5MsBcVltN/iZrVl+9DAyoKpYVqu Hn6fIqcILqNgtGc25ttght1XALrZmjth6rPwiEuUoK1hb6t3tWPWyc3Qzp+UKD9iWXO2 JNdA== 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=u+u2GTLpTwv9NrMPHkakKvWn/ABYNzXl/Rjh49VH7qg=; b=ly6Ly017QbDEQNrI9pG/j+sy/7qPqWMkRtshqMDthl0Yl6GjQartVEZLvvMyeG6AP+ d84uv4e7+V9w08/RK9Z3cwDUSdZADDqApO+64419YmdGhbfUa+jG9V0fOWSKfMjfADy7 bJGsgtjhN9oEOBNKQxKMPBPyK9Awh/VsBWn+VJuvTSp3d2geqLZcymONcLFFK6YtnnL0 c87hHC0sAzr5Z2fUVJrlgUGVGqFpEZZVm2Ez4Rv679qCruqtiUix1RqYFzGdO1qxeEyy cyZgaXgS+LvIoYeARyIqUy0rrE4YFs9PUmj9RZzf1NvqcjsbJc92pAh2tI8ugfxzMwtn kMsw== X-Gm-Message-State: AOAM533NSQCsgE/2KELAcW+80yc7p1u6xmlw/sxM3C3LtSQZL9ZOkOH5 UwE+XxNVrzzQV98H4w2mINOYvaCDeB0= X-Google-Smtp-Source: ABdhPJzYIqfbpGHBnmTB9PYmJff/M30DsD/cf7AdKY3UixireeWUKL+gqTlQIlkfQp4bjZw01W1iqg== X-Received: by 2002:ac2:464c:: with SMTP id s12mr17263936lfo.147.1589367215847; Wed, 13 May 2020 03:53:35 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:35 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 04/12] target/mips: fpu: Demacro DIV. Date: Wed, 13 May 2020 12:52:59 +0200 Message-Id: <20200513105307.22638-5-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x143.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 449e945166..2759c9989d 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 Wed May 13 10:53:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545779 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 63405186E for ; Wed, 13 May 2020 11:00: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 38281206F5 for ; Wed, 13 May 2020 11:00:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="h4id1/Oe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38281206F5 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]:53632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp7X-0002Ry-9g for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 07:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1A-00006x-BY for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:40 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:32836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp19-0000P7-Fq for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:40 -0400 Received: by mail-lj1-x242.google.com with SMTP id w10so6530500ljo.0 for ; Wed, 13 May 2020 03:53:39 -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=U9Bvm6vL09AIwqK4OvW6xKwpQP6QGlp9aoqhYUD54/M=; b=h4id1/OeVI6MNgDuoP0u5zvDzcV3T+mq2+rogs4EwZbPpqZ6QSkH3sVywgBVRJrc85 hAXEV1HcxEQkcJMxooCmiYpfQcDLVS3GJyKYbIAo+PtYmGluT1P/NiUG48z1MGT3Z2GR IiLS9Lo/kwYg6jH2rAakMGLAGvTboT8+zNdCaRYwm9mlJnWgdLpMHM0jhtp4kUywFXr7 Lq+7O4WGvgXAscc39Lirr+lZUjAUUNqSZdf+xKAIegUoaUk9CxseFkiEz5sm19iwla3U L2TzIq6KDC4CSxxiBOuGYndNP7Z4IcGkxykKUuRaax/3J+DDvy7x+dQV5DqqsqeLdvbV pc7g== 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=U9Bvm6vL09AIwqK4OvW6xKwpQP6QGlp9aoqhYUD54/M=; b=VGCG2PNpXQm7tuxC66ZsNf9Aiu7WNTwrQQkWuM2Ksm0oZzpUjy595i8QViDfsdsb1I DbePSMLVLHc72dgzbXWeXqu3UCmV54O/YFwi0J0GUx2HNhkMXam6X5iVmElinM6VfS+l aZwsGoXVM1MuT8v/e2fZOa/NspOjT5az/1eJ0vbMz0sj3otHuyCcirCp4IW7UOo1dxY+ BTcZywKBtQb07JaY18T/6oQJRjTw9jz3OP394f168erpr4pJDyJGDuHad+RsiobaTkZX RzBCySc9HrV9YoQdwlX2hZXtnCQqJ/8HpejymYGZteSobAQDrSHWgijoCIM0+JHteL03 4vOw== X-Gm-Message-State: AOAM5314tVURdbi6GUyHwZuZ5Ljx7yV+Jv5IyEhbvYs85XgIo+ZnCjDD 58i97hhOZaliLWRcM8qRHKBgJ2eNjYo= X-Google-Smtp-Source: ABdhPJzV80kCxw0TzEYpfN5ZOI7yUzzWB8b1PbvzT/N4F487bFCDN6nVwi1yBQcIzMGe5338XUxbpg== X-Received: by 2002:a05:651c:549:: with SMTP id q9mr17221874ljp.236.1589367217751; Wed, 13 May 2020 03:53:37 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:36 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 05/12] target/mips: fpu: Remove now unused macro FLOAT_BINOP Date: Wed, 13 May 2020 12:53:00 +0200 Message-Id: <20200513105307.22638-6-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::242; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x242.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.rikalo@rt-rk.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- 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 2759c9989d..a3a39681f8 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 Wed May 13 10:53:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545765 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 CD14514C0 for ; Wed, 13 May 2020 10:56: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 A1FD320675 for ; Wed, 13 May 2020 10:56:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ac+vlKlh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1FD320675 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]:41262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp3i-0005Ra-RO for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1C-0000Ay-6v for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:42 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:32837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1B-0000PJ-6Y for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:41 -0400 Received: by mail-lj1-x243.google.com with SMTP id w10so6530595ljo.0 for ; Wed, 13 May 2020 03:53:40 -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=NfiyJnH8f+NZGQdRmwsMGxjYlt1H1kJMr2qydSKKkTI=; b=ac+vlKlhdO4En0j04Ox0e9f4B0oyOrZbuqru5ID1mDvt32Aw9sZcfgJyRlp/EhwDvl GxEclcYBcLkAAoZFrDkOFvJsL/XEScEudlYbex8KyTyM2ZUTdYxKcN0ZjS+2JXnZCJBN 2orY4teiL8awPgwMrbw2VNghAxtw4i1CPE1BYAB1IAoXMFNqFerXbpvxiuFGa2kPi8aT SFBwqid7Km/7Ss19o8apCcKMTPYWGdvRiazJh33sYmalgoAwTcgpCLsx97nRBcoO9vQd iI1O37YTGmJ7+pefsDFMD10NJf14h4tTh0ZFFstqpp22H8g1XLzdwxGoXaUJmtbpiVKq vrqQ== 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=NfiyJnH8f+NZGQdRmwsMGxjYlt1H1kJMr2qydSKKkTI=; b=WbFkJGZ3wOAOiPAyTeUN3XzDW3/g+yruutUAL6FrZSqvZaPnvPgT+OrCJ0NCQ+FAEe kkz5WNgp06w1UxMuJcTtiNcEgcb8RJvzWHJ6OXUHPcvVZQCQdcL3bJjZZBMvNqbujxDA bXkKlhnKzNZdQzwMWZ5QV0AFJ57noVxBedag7TLOmCArVyvNhOXI45VYc7SKrAMqeLCt h17aU9XtH7byKEBCtsN+FQdX/UmjYELEa+yV+NxJP6MhyrWSyQTmc5kf2OBPwv2N2V4X hpl1Juxlzr9CqvUXu03zLnVCHehNl0V6pFUL3Q5Ozy7dyfUgW6Prqi9Ory/+8g0UW/kS zz5Q== X-Gm-Message-State: AOAM530JIvOWH9oEa3mjXOt8MfNs5t+AnnA28dJINhbGjzn2DqlfuBi/ o/4akyiCn0JJ9njjwE+VpHqG40PpjHs= X-Google-Smtp-Source: ABdhPJxENcL6cl+UA7BWxRI8mllAn3zjr5X3BelLVKSaYH+ZRnvlXMQ/S3MEIvE+3n4e9wJGByQ+OA== X-Received: by 2002:a2e:8047:: with SMTP id p7mr15983619ljg.206.1589367219449; Wed, 13 May 2020 03:53:39 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:38 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 06/12] target/mips: fpu: Demacro MADD. Date: Wed, 13 May 2020 12:53:01 +0200 Message-Id: <20200513105307.22638-7-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x243.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 a3a39681f8..c070081cbc 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 Wed May 13 10:53:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545773 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 BF63E17EA for ; Wed, 13 May 2020 10:58:18 +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 923C820675 for ; Wed, 13 May 2020 10:58:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EhG1Tb8a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 923C820675 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]:48102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp5d-0008FZ-QN for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:58:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1D-0000DM-7j for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:43 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:35038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1C-0000PQ-Fg for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:42 -0400 Received: by mail-lj1-x244.google.com with SMTP id g4so17264041ljl.2 for ; Wed, 13 May 2020 03:53: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=cbkkh7kOu27EfvNkT8gehafOtZOmXDYce6iol7ZHVX4=; b=EhG1Tb8agfIHcAk7zGCH7QB5fuKsEAcKbOvLBy+XoBL52dHK3BNuUdVd3CbcPiC3YL FzWTIUClpVFItXHeYwxa9EufWX5pIUzdmHWTjhdMN3I7/dFBTZClovlBMyNvtsm9fOas 3ez0YfCsW946e1u4VNeNoyiDAHDdb9+gveXEY9mctYc7nzfoBGrXQ/WE3k5qjjD82RTW 3fD732VQ0VO+QYGdZu5Z743EeJla1Iml/ga7ROv9WtQkcf0HDBxlymDgWJFlFEdvzyv3 ZN4cfynmpzapLu0bEyItIYSmInSjBIAedXQO5RSSf9DwlXBkG5NiXIeBHBT+1+k9O45M /F9w== 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=cbkkh7kOu27EfvNkT8gehafOtZOmXDYce6iol7ZHVX4=; b=GaBAhJ6zl++EFQ14u35Ax90QE1RXXJ7eO5Po7CmCkysptUByYMsqC1a89P1doZPPIq 4uRZ7r6XGKDHuEJzVqkjaVJqJQKQjigXLdCa+9ji2p/Kbm0ITTmLJqtLu2im4VdQrSg8 KmQXwFpaJhHN+oqSNOd+4k7fLZ7cRv9x3KHG069WHg5yeEgPxz78RSLJsH2e9YDY02gU sxxNmgp3n4n7oUsi0FUEN8QpmUe7BS7zn3hUi83RMVoqH7heZMdTSdea/ycv81pYk4wW maG9cUyMRYyJ5uW4kiPlo3j+74N/eQFq4okrpMWbH6sN2G2371dapmLz5HSXoxOupOP6 AjiA== X-Gm-Message-State: AOAM53103ILovRSqW2l49Ocr/yB172kxqJuPDkJFdGQtSReq1dt3NnLO l/1OSzydYpVOP9nfLP4/eLvXbFvh5uc= X-Google-Smtp-Source: ABdhPJx22K7IIuYfbcePDDgZ9s/7ejFleAn7NMfQtjkYtBNBcS9DZ3g7RCnf4O1tOaldVICbIUFspg== X-Received: by 2002:a2e:1654:: with SMTP id 20mr2836493ljw.118.1589367220893; Wed, 13 May 2020 03:53:40 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:40 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 07/12] target/mips: fpu: Demacro MSUB. Date: Wed, 13 May 2020 12:53:02 +0200 Message-Id: <20200513105307.22638-8-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x244.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 c070081cbc..e37fc4075d 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 Wed May 13 10:53:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545777 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 40F0A1668 for ; Wed, 13 May 2020 11:00: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 126E820659 for ; Wed, 13 May 2020 11:00:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hBVvNot8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 126E820659 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]:53618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp7X-0002Rf-8E for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 07:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1F-0000HR-9Q for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:45 -0400 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]:46694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1E-0000Pi-Gd for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:45 -0400 Received: by mail-lf1-x141.google.com with SMTP id v5so9135404lfp.13 for ; Wed, 13 May 2020 03:53: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 :mime-version:content-transfer-encoding; bh=aVn12E0T5JzktEFTA5pyhzwavRrRDjMRjIN9w81ZdKk=; b=hBVvNot8XokneP4qbhkg9hAWh9blvBSO1opWoURpIP/iH97Tb0cPxVGyMqvyv7272F EasrJ7TbNy6tS+x/FQnXyb3UWkYmjLOAPHoPCEZUCHTOBmVCxxmSGQE2RMZvy6Gy3JPm 9OeX38OcTMkz2lz0HakZjmnib8eEYEi4jLwioYHPCxwIMn79uafkzvhI1kSLjrq5E3Gr DJ461dz9256Z5d5Q56tqayNIzG8k0/9yqJdUi024Qx9HZRRtzZLqbJzFc48M8bOmxwl6 fnys5BkAORaszLGXGFz9cZD1OU0TQzCZxjs+TVLkyJzpTzUlMNdu2FgEkyOeoz5FUJZY Uf6Q== 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=aVn12E0T5JzktEFTA5pyhzwavRrRDjMRjIN9w81ZdKk=; b=mSlq/zciLj+yRlsCksjfWPXAj5BSTMVaVrWVk1TE9Ufg3ZRnXvUmGAtD5aP7Fwtjxw PMvYkzT1LUPIGMHaXxDMhcJ5rsZwdadWm2kdwHd8762laR5CoW9xpUFMMOy97l+fxgRx /ptEm7y0N/Qv7BhvR4fIiAfH0hlboRfjwAVTiuzBVoO+c25Ss99ABcKz6RdGnts1uMRW pt3lQgMEEuEb8NYHpOXXZ/T25NZRJds7WJrkUp37jqBDZsEuZTuT8/HkCfynGLQ60LRn W4liBcLba1zo1cxQNViti/Ba3kYaGuMdYMPis0oF1TwVPjTJfn6/scdD1vsRJvfBdiEN B2sw== X-Gm-Message-State: AOAM530KhvrtwzA0YGf4Y31FVadRAAhwBqVcENp+pkMd9yv48SZXJU4D qwl7xSqziNPiHhfNS8ZG7L+saDxPwo0= X-Google-Smtp-Source: ABdhPJwUri2NNoFg+lzgo0pVvnjJA12o8EkMUQPrEWV7ref7aRvGlciM0aLI1LPtGz4Gdb0MHNWJFw== X-Received: by 2002:ac2:5b41:: with SMTP id i1mr17334970lfp.16.1589367222771; Wed, 13 May 2020 03:53:42 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:41 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 08/12] target/mips: fpu: Demacro NMADD. Date: Wed, 13 May 2020 12:53:03 +0200 Message-Id: <20200513105307.22638-9-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::141; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x141.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 e37fc4075d..d4c065f281 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 Wed May 13 10:53:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545783 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 3E49E14B4 for ; Wed, 13 May 2020 11:02:32 +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 1418120659 for ; Wed, 13 May 2020 11:02:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UUX+xMb+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1418120659 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]:59276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp9j-00059l-8B for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 07:02:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1G-0000L3-U9 for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:46 -0400 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:45778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1G-0000Pm-2f for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:46 -0400 Received: by mail-lf1-x142.google.com with SMTP id a4so13216011lfh.12 for ; Wed, 13 May 2020 03:53: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 :mime-version:content-transfer-encoding; bh=meiIJB+AmHAaVbmDxwspWHGXDAbXPn2CTH6+8Q6LmGo=; b=UUX+xMb+WjTpq2rox4Uwhqj0wU/+TPER4WkU94BFtnKaTtjIhYY4aULHOPJA4jhgRi AM+Fk49MPW4QgTagWVrMo3o1rruOvm7uSAvpwoYPhvNwxlGkKFq4rGbNpTLKw/f5p/zK 0d5ZPm08+3XJeVwDCDZTji1yTH5omV6H6sI8hkXoie+KL2lScoZx+86/+FZPxxAQMlv9 BWIaanBgtY8yKnV9yRF1bvyoWFup+zY0mlmija+o8hExxUB0IOUDcdbR73phAKdSnmF3 KklY+1ozNoE7VDiYFt9AcdOyk7u7OalpG/qq5YIWRH0t0xfmaUY5n3rvEn+IAi27PxC1 YhYQ== 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=meiIJB+AmHAaVbmDxwspWHGXDAbXPn2CTH6+8Q6LmGo=; b=VV/MtEoToe8HLvYbMTFNBOpGJoj0cyZyoRHsRH2neOBX0CX9bg0noMC/DtcIEH0APy ylUrj4LimjmMHrzIkzp2vUAwUT9Jo+nfKPE1SUAyf3ExU5OYDoVsfPQYl7jpMW4CzQRZ 0S70x7iMrwYls7CbGM9QHQXYqPbBUFNUq0/NYNl4YbNbQDATVPzYvPUhk2kJSY4Qa+hQ meaBIVg4i6tPwa/Ywy3XKjht2NW+mYhA1Ju7ajYxQCgZ9GPqJBp/6t/IEyLcEGZOj+Fc Wq3JqKZ0aodPxEmi0RFudctx6A6xGi3a8f5NiG3C1xriiAkVfY3/6KoJ8/S17mI3SBaO LX7w== X-Gm-Message-State: AOAM533qpKhCAAmCQ9ze9IY1oSHbCrtGbKjTFLrUzzd7NxQ94cPqNrD2 SRHuFdNBqWVMfzRw67Ahz6H2+ELYCqw= X-Google-Smtp-Source: ABdhPJzAa8g8580Ui7AYC23aEZ/m8ItTMGapRtIfbTQkBAmzNEdIvLSmN9zxdOtdnaNsDBgcp4Dp6A== X-Received: by 2002:a19:7004:: with SMTP id h4mr16561533lfc.148.1589367224331; Wed, 13 May 2020 03:53:44 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:43 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 09/12] target/mips: fpu: Demacro NMSUB. Date: Wed, 13 May 2020 12:53:04 +0200 Message-Id: <20200513105307.22638-10-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::142; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x142.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.rikalo@rt-rk.com, Aleksandar Markovic 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. Signed-off-by: Aleksandar Markovic --- 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 d4c065f281..927bac24ac 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 Wed May 13 10:53:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545769 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 3FDA4139F for ; Wed, 13 May 2020 10: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 1665920675 for ; Wed, 13 May 2020 10:56:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OWqoaHxQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1665920675 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]:41518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp3l-0005Xm-89 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:56:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1I-0000Ox-CZ for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:48 -0400 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]:34846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1H-0000Pu-I6 for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:48 -0400 Received: by mail-lf1-x144.google.com with SMTP id x73so13230296lfa.2 for ; Wed, 13 May 2020 03:53: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 :mime-version:content-transfer-encoding; bh=LEEebxVW8gD5Jf3WtTY6qNXWnlQDM14seyCqM6owgfg=; b=OWqoaHxQfJEjoFBaLMalK4+aomj04sZ3o5oo9SmRkD8WfSSedbIICsVI+Gz6Xx41bs INxmm5mDCmTSuJtUeBv0bHD7lJtpz1eUxQSNQlDD/Td3+pVOF70780pyLcwl/l5DHsky g32fxXTliCkjcBgfzAeX7vMKcp1+q7DR51nYR0dgntWxKHRo3A7Tl2d1h+l5PiNpPzMM 6HwWOJ2FETajyx4ffuYiJ7cUTYWr/mEY+93bc7hPsKQqWs2lT2a9CQVIXDWz9cka8HLO KLpvE5Xn0TUCk9IQsbfoeu3F2JmaWJ4U5mRHh1kAS+wPMEY48xqS8HomBzB+aslV+3VB 6wwg== 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=LEEebxVW8gD5Jf3WtTY6qNXWnlQDM14seyCqM6owgfg=; b=iOIJIM/ak6rtXmu1crE5UHi0CcNHfUn5bfG6lFCc11QqJcup8WI4uoM2h6I4I4PPT0 AqJJHT6hNpOFutAAS3427UgmLksXWAeoVm5ieLiziMpW9TX1ceLHNLHGTsBdBboGtuIw lA765kqiUyI6UyEOrZVQ8e5pJX1bRO8RZKnqeEoZqPQ2J+BmPjhnApKpNM3thmZoH0tn uCVgMlA2EZCgL/CvGn9fmDDYGStNKP3Mq6LbnpX/F3NTZsJyApd9/wl1C3ei5w7QeMH+ qM46sSpzklASepehro8ynrwKwGcHa00k6gE4+JAfkZLUQxlGXXguysqJujZAYdsjbGoD kojw== X-Gm-Message-State: AOAM533uCgGLWjqxXlqaEw9oFl7tHLAD5fWFGvE0gCC+MlgbUSpSnFZP WC1Ob66j2FFAGpmA8HCbsTlIYy2T1C0= X-Google-Smtp-Source: ABdhPJzrtWB3x0T5XArTT3Y5cfhvGQrc1nxdbGBnz4OotdCRYMygiU4/NZvRXY+hp8EuAvYd7yl6Zw== X-Received: by 2002:a19:c394:: with SMTP id t142mr17920104lff.129.1589367225730; Wed, 13 May 2020 03:53:45 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:45 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 10/12] target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros Date: Wed, 13 May 2020 12:53:05 +0200 Message-Id: <20200513105307.22638-11-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::144; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x144.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.rikalo@rt-rk.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., these macros are not needed anymore. Signed-off-by: Aleksandar Markovic --- 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 927bac24ac..e8e50e4bc0 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 Wed May 13 10:53:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545763 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 CC2E914C0 for ; Wed, 13 May 2020 10:54:45 +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 A0B2820675 for ; Wed, 13 May 2020 10:54:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sjNYunXV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0B2820675 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]:35100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp2C-0002hr-Nn for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:54:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1K-0000UF-2N for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:50 -0400 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:36782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1I-0000Q3-Ux for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:49 -0400 Received: by mail-lf1-x143.google.com with SMTP id c21so8605758lfb.3 for ; Wed, 13 May 2020 03:53: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 :mime-version:content-transfer-encoding; bh=TPlrKXMqOt6F1nWyZUeKHiEhRWnwEI9UmCLWlCWhnR8=; b=sjNYunXV0Gpl7hj9F9ClgALmjVTAJfEHgxr3hORZTB31wQ8vhiE5dWj9Jntb3jvbJj YMEAiRZQpnX+0JcLdtfFjcHDWhgVr4f8W6NjY18hrbK5Ukeb758tDRemlJgEc31YpgEm pqB5xWnn8YTMDiIZudhNHjtsrLe1OkkYvZbfWmqy5X1mq3E9AY9w8Cl8usRiI1IoJWG+ 5PImLt7XlJ1L/7FaIUS2mqtilKZMXbaVNqPQf0K0ih/NjR8lwMEGTusX0zclkD1hQVka M2kXSox17tWM7arcHtnSUQI7VAbd/bGrk+4nhU4i5GZebtsteeGtVF3tQtaNg2HkSz92 axbA== 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=TPlrKXMqOt6F1nWyZUeKHiEhRWnwEI9UmCLWlCWhnR8=; b=YXQOg33QyxP8d1VyHH7wFNMPaVcZsQhFX++vB5OEkRXeFFgTDrAxnnfcga7MSyTG+d uInDyTIX++piaOhlKv7nSF0g8nUlkQhQQEPnfdBcWoJAmTDVJLmkIu4dcYyOlkpo7Zj3 6YGh/6toaNbfIqVK9wPIqGmimzGA/EGYoq2qy5Q0whJNSJxMPaMQcVAPhFB8Q1578PdS 8U/gZ0EkExOBDVNp2qGnSCZSShAhPLNAc7jqQGuuD6z7goIGnosUw+mn9bNdSavnUgtK NXTD8i9ChSrY/EAGneLmokSJcX/Nm34BCmNhHdk57PRwEgnMxEygMyYCLNZuR4LV6TCY +x3g== X-Gm-Message-State: AOAM5335/M/oKH/b+3nBC+IEwO9LLCtyngiyUSzt0Y9ojXnPZr9MuVLT 1ocE8r91vT128KzFlhCT1UGBbs1iNpI= X-Google-Smtp-Source: ABdhPJzZFMbbBab0BI4Y6kb/jS9GFBlD1PhRiaKVnTKa4Hu/KQB2O7qhOKvutZuGHdMkRbqTfZeTug== X-Received: by 2002:ac2:5199:: with SMTP id u25mr17458219lfi.80.1589367227234; Wed, 13 May 2020 03:53:47 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:46 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 11/12] target/mips: fpu: Refactor conversion from ieee to mips exception flags Date: Wed, 13 May 2020 12:53:06 +0200 Message-Id: <20200513105307.22638-12-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x143.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.rikalo@rt-rk.com, Aleksandar Markovic 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 floatin point excetion handling, provide two instances of the conversion function, rather than just a common one. Inline both of these function instances for the sake of performance. Improve variable naming in surrounding code for clarity. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 55 +++++++++++++++------------- target/mips/internal.h | 1 - target/mips/msa_helper.c | 77 +++++++++++++++++++++++++++------------- 3 files changed, 82 insertions(+), 51 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e8e50e4bc0..aefb5291de 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/internal.h b/target/mips/internal.h index 1bf274b3ef..684356e309 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/msa_helper.c b/target/mips/msa_helper.c index 4065cfe4f7..c520405929 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 Wed May 13 10:53:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11545775 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 A7A7614C0 for ; Wed, 13 May 2020 10:58:21 +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 7E6D620675 for ; Wed, 13 May 2020 10:58:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J12+pN33" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E6D620675 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]:48298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYp5g-0008SA-Le for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 May 2020 06:58:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYp1L-0000XT-D1 for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:51 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:35038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYp1K-0000QB-Je for qemu-devel@nongnu.org; Wed, 13 May 2020 06:53:51 -0400 Received: by mail-lj1-x241.google.com with SMTP id g4so17264457ljl.2 for ; Wed, 13 May 2020 03:53: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 :mime-version:content-transfer-encoding; bh=sGqFZp4/8DHvwZ4dwcHeJPKSRCfhEUhOLVb+pJ0fcYc=; b=J12+pN33wM5Owx84NBMNCQH6a9Mig52SeRRTD6DHQ8SZNkMLwcv7BhoTXGqhfxrgPX 7F6GBRVRn7M5D5239EYd3ak84BM6oSFCxje9KvHvRHKmEG6sgEjEfrDcrb3HpSUzy2WM hyh8K6WJWSs8vC6VD1DwBXmfRBGEtM4FbJLEeZP+npTpOoC9nBItyd11HnrnhWRF1ngB Ct4mTqomqr9KivtWtu8TttMHGP6MSLmNAH2gP2voFTXcfOkzoFTr5tn1odPTpa9vDq4U kjeJpZPGSW68CZP4GTYeaSborfpDf4ezXhIBSh63Guurop4fdKkeEtxAlO6FgBHpkx2n jkqQ== 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=sGqFZp4/8DHvwZ4dwcHeJPKSRCfhEUhOLVb+pJ0fcYc=; b=NWqqP92JkV+Gj40gWfl/7AhVbzqwvbxrzEIgmW1eybMyRITGERBWq11OJdeLZ18Drt KBQnxhgyLejbyAcR1Lg/BdgKokcPBpMLYlRhWheu3gtWpSqrKErOgr1xCamh6nQct9n6 vV28S1ACgHjb4BfZTPpTOvHzpFOQzHhY9YOz+vFLKrr8fAiYrAXrmmWfq8jk9s8ZtAMD TljCJov7DcikVLseITNvamuaKzLSGE9NaZLJBLbITOxnesOo8Ut92G+aUCFDVs5+PBfe Wc4OgI04X8jSolZN7KHZsf8fR/f7a2AaZAY0QJD4sCrPRgGCAvnClBkrJQzbjoS6fOqO M8zA== X-Gm-Message-State: AOAM533iu+YNqwjyDYnSQe63TQwaejwf8v7qiOmjcEaRmkbx1QlGD170 shCPnZnAakQ+afYpE1t9ihCza3+cEkI= X-Google-Smtp-Source: ABdhPJzXznTWu9qTDoKP4xzQ2eY1sL6N9BEexZWq1FH2nuxSSoGhasi+WcHFEbEOo/OfwFhdogwejw== X-Received: by 2002:a2e:3813:: with SMTP id f19mr16627059lja.216.1589367228882; Wed, 13 May 2020 03:53:48 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id z64sm15749417lfa.50.2020.05.13.03.53.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 03:53:48 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 12/12] hw/mips: Convert Malta "ifdef 0"-ed code to comments Date: Wed, 13 May 2020 12:53:07 +0200 Message-Id: <20200513105307.22638-13-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> References: <20200513105307.22638-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::241; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x241.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.rikalo@rt-rk.com, Aleksandar Markovic , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The checkpatch complain about "#ifdef 0". Convert corresponding dead code to comments. In future, these cases could be converted to some no-nonsense logging/tracing. Signed-off-by: Aleksandar Markovic CC: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index e4c4de1b4e..f91fa34b06 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -427,10 +427,12 @@ static uint64_t malta_fpga_read(void *opaque, hwaddr addr, break; default: -#if 0 - printf("malta_fpga_read: Bad register offset 0x" TARGET_FMT_lx "\n", - addr); -#endif +/* + * Possible logging: + * + * printf("malta_fpga_read: Bad register offset 0x" TARGET_FMT_lx "\n", + * addr); + */ break; } return val; @@ -515,10 +517,12 @@ static void malta_fpga_write(void *opaque, hwaddr addr, break; default: -#if 0 - printf("malta_fpga_write: Bad register offset 0x" TARGET_FMT_lx "\n", - addr); -#endif +/* + * Possible logging: + * + * printf("malta_fpga_write: Bad register offset 0x" TARGET_FMT_lx "\n", + * addr); + */ break; } }