From nobody Mon Feb 9 22:04:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1599569153; cv=none; d=zohomail.com; s=zohoarc; b=c1Gmzwe3koX36In92dIcaQvu+lno6XYlwjAY6EB4kB24upFEPxpQdSM3dEQFN18MFqHx6lu78t3H/QhVB3bL8ppfTpbzhFj/fG/2VeFcmsTlZOIdyysLBoscO7NOPx6PuqHWqDt4RqxknF7z0T39JFQpa9PASs4nVc/89juuQJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599569153; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=1g3oKVzWdmlYD9vf8mBq95tsayfNUOlsZ6AfVzlFnBs=; b=RyL1wN5T5HhynPekRiwPKQNehifdCvcLygAMfLxycLcK00q8v4tDnEm2IWlIAU7RiwATeOVpKIyS0hUyj0o1jeBj0AH4gAkugfJN17ojUzfPIh6EoLTE0c/cSRuBicCVeDkTW1TVqZWRYB+7+Iy5PeYYectSeopL9Tl6xwkFB7I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599569153404602.8315040190897; Tue, 8 Sep 2020 05:45:53 -0700 (PDT) Received: from localhost ([::1]:33144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFd0S-0003Sk-26 for importer@patchew.org; Tue, 08 Sep 2020 08:45:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFczF-00022i-8L for qemu-devel@nongnu.org; Tue, 08 Sep 2020 08:44:37 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:39959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFczB-0001Kv-OD for qemu-devel@nongnu.org; Tue, 08 Sep 2020 08:44:36 -0400 Received: by mail-ej1-x642.google.com with SMTP id z22so22284412ejl.7 for ; Tue, 08 Sep 2020 05:44:33 -0700 (PDT) Received: from rtrkw774-lin.syrmia.com ([46.240.135.226]) by smtp.gmail.com with ESMTPSA id u23sm4396604ejc.108.2020.09.08.05.44.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2020 05:44:31 -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=1g3oKVzWdmlYD9vf8mBq95tsayfNUOlsZ6AfVzlFnBs=; b=WIblobIg+Wntj+LTWy2KgvgEoSFlCs3ED5hya5YdRYfT9uiIWpih36w89axSL/aonw I1jw6uDeJAh7sNHv+g0wVkYf4t+t7/n8CbXH70ChGceO4WxTE0csItRUl3R6ujNRymft 19Y+myvrzIJzFHtJFcsIROvIV6wU0vwmTKT+etNpv0pvqRBGM+SAKkk+ask4MfGfRd53 ka0x+L2ydrk62q6ZniCg9+2rSMTjF0QYyeopvdjy/XHRx0d3tduF8wyIPzSQ5ZNTkxeO ewv9lH6E8whzy37hNuU2XJexIAXPc5rpV5Kwf0FPSEQIRD7qW5F+uTV7nsgdazl/pj6F cTtg== 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=1g3oKVzWdmlYD9vf8mBq95tsayfNUOlsZ6AfVzlFnBs=; b=B3MbshDEM04/O+XpLQc/1jDXIRykINHLapxSpMbwJTELwmNK7V/UksZNZkL3V0C22F M/tskQsLWlu2PQFtOP4ZX3GWI6qSSw08nNCmCJshazwvawcwsqSriG6TFxEYU1j2xq4B yL4Ds6sd4f6AjIpFGzC5NcWjnFxAggwbxPTQBEUBfthB3qByf17fQfP3t+uIraCDDVzL oLiuMSuY1arcMNQJto+2/+82HNB74eSF89SEYQqbhWfARg99rhsyj+jNJlJE6ROB9KV4 ZSzaOhECIOC5SHtcHbysPsvO25eJqUQXjqUKlpLOMxOEAqkf0CIBJciau81HE3T9Ktng vOlg== X-Gm-Message-State: AOAM531TV6gtFiV9orzmPtbxv9WNxdiEU8dex4CClql6nBo+4NQCD8X1 UudLYtFRoS3D6lY3vh6Rl/+2G7fIx3U= X-Google-Smtp-Source: ABdhPJwe5C6KnNEjcc+ReesoAED3qsCqc/SykIjdbXlh5EmLKMDBtxVTrpGdAlwGvU0RgVhzugTGmA== X-Received: by 2002:a17:906:454e:: with SMTP id s14mr26412130ejq.137.1599569072107; Tue, 08 Sep 2020 05:44:32 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH 1/4] target/mips: Demacro helpers for . Date: Tue, 8 Sep 2020 14:44:25 +0200 Message-Id: <1599569068-9855-2-git-send-email-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599569068-9855-1-git-send-email-aleksandar.qemu.devel@gmail.com> References: <1599569068-9855-1-git-send-email-aleksandar.qemu.devel@gmail.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-ej1-x642.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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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@syrmia.com, Aleksandar Markovic , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Remove function definitions via macros to achieve better code clarity. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 61 ++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 7a3a61cab3..f89213947f 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -983,27 +983,46 @@ uint32_t helper_float_floor_2008_w_s(CPUMIPSState *en= v, uint32_t fst0) } =20 /* unary operations, not modifying fp status */ -#define FLOAT_UNOP(name) \ -uint64_t helper_float_ ## name ## _d(uint64_t fdt0) \ -{ \ - return float64_ ## name(fdt0); \ -} \ -uint32_t helper_float_ ## name ## _s(uint32_t fst0) \ -{ \ - return float32_ ## name(fst0); \ -} \ -uint64_t helper_float_ ## name ## _ps(uint64_t fdt0) \ -{ \ - uint32_t wt0; \ - uint32_t wth0; \ - \ - wt0 =3D float32_ ## name(fdt0 & 0XFFFFFFFF); \ - wth0 =3D float32_ ## name(fdt0 >> 32); \ - return ((uint64_t)wth0 << 32) | wt0; \ -} -FLOAT_UNOP(abs) -FLOAT_UNOP(chs) -#undef FLOAT_UNOP + +uint64_t helper_float_abs_d(uint64_t fdt0) +{ + return float64_abs(fdt0); +} + +uint32_t helper_float_abs_s(uint32_t fst0) +{ + return float32_abs(fst0); +} + +uint64_t helper_float_abs_ps(uint64_t fdt0) +{ + uint32_t wt0; + uint32_t wth0; + + wt0 =3D float32_abs(fdt0 & 0XFFFFFFFF); + wth0 =3D float32_abs(fdt0 >> 32); + return ((uint64_t)wth0 << 32) | wt0; +} + +uint64_t helper_float_chs_d(uint64_t fdt0) +{ + return float64_chs(fdt0); +} + +uint32_t helper_float_chs_s(uint32_t fst0) +{ + return float32_chs(fst0); +} + +uint64_t helper_float_chs_ps(uint64_t fdt0) +{ + uint32_t wt0; + uint32_t wth0; + + wt0 =3D float32_chs(fdt0 & 0XFFFFFFFF); + wth0 =3D float32_chs(fdt0 >> 32); + return ((uint64_t)wth0 << 32) | wt0; +} =20 /* MIPS specific unary operations */ uint64_t helper_float_recip_d(CPUMIPSState *env, uint64_t fdt0) --=20 2.20.1