From nobody Tue Feb 10 09:57:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) client-ip=209.85.221.65; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f65.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602943391; cv=none; d=zohomail.com; s=zohoarc; b=G2Tjpey+HdlP+W0tR0dnTjZnXT4WschWsQrBUldIt6E6vACrc0VL2xIuF+NlRZYKuGSi928BAhUKJGZ5hbDBtChfxrMRw0RzDx6OleTzoLCWC4ma7Dwl6rqjAS8LyZ6cyECxiBp4xl8JlQuKBDDlEEPwr2wk9raAbh+anPhSO6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602943391; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NKriZfWZy7VDzuwNa8INVpQFiDmOp1zR9QaKdg51zCU=; b=QBPOimLZtSn2q8j7tIVs40gGq/z7KGI5AgPtGg9eMmHw+3Fu/Co5t+qMU4Zign9gICjh4AC2rrnacDeV2jy+n7WekMsAUVX0U0Lz9GDZvFvQFa2QvNM1WTu8sjFhqWoxETgwMSYQzfTDwWxafbF3bAoAVcTmPSVLo3f9gdbZnEk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.zohomail.com with SMTPS id 1602943391336744.4493436057506; Sat, 17 Oct 2020 07:03:11 -0700 (PDT) Received: by mail-wr1-f65.google.com with SMTP id s9so6557302wro.8 for ; Sat, 17 Oct 2020 07:03:10 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (117.red-83-52-172.dynamicip.rima-tde.net. [83.52.172.117]) by smtp.gmail.com with ESMTPSA id 205sm7816168wme.38.2020.10.17.07.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 07:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NKriZfWZy7VDzuwNa8INVpQFiDmOp1zR9QaKdg51zCU=; b=bmyZGF8rClLcePprRp0bTQA+NNBuA50BsV490rx1eKcKn3iTqvgHkI6OA2rFygCJRF rr3rb998/1/mz7mtLX0RHX+jWfBBPkm8FKVTZWjXRlu2cnbLVVqKknT8kl7Cc4f3tefJ iZq5czFGsuGDkICDKYEqG6EIiNUkx9rOAZcSlA2ft5KlsVvcyk6dfIBJzG6H2aH3PIzs xF8Q1iSm9cPO9oC5XH1Esuxz35vFluJb0+SDRKe0xvr3IeFXHusAjNq774JhnE0/RnqJ VyEuaQkVvY7AdBliS10D5nYqM56kqQEKHbYAK3o/OgLDVnJlUYJzsb3YPfbHKfxzesEc k0Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NKriZfWZy7VDzuwNa8INVpQFiDmOp1zR9QaKdg51zCU=; b=DS0CnevkpVr3qPNZehl8Yued/9eOuWe7TrX3qqkNcM3IW+/8XUZ+88yuraT7EREehR kgMnFeFxXnguAigcOyi/0NZfF3J7FfGgHrCBzfLUAKhGLWdk9oCYoaSOXKV6i8KJGVoK X3arDZzO3DwqhNhIK06ph8HtBxJ91Ee08E4Ncpm6HG+KV7VPDmfE/wFPAq6hzoeI7vh/ CE0uCzvPp1aCGRseizDdFDrBYtHlhto3A2KBXKD9akaiwgmRdjOi8S6OgBGXjGlTQMTF oIoPbQTFBwxtqCDGWuSlq83ijfxgp1et/GuBJG/8FOdX2TEhEgr5VJsHixQNBnN89Eco gtjA== X-Gm-Message-State: AOAM533SsxzXdnJzaSKp/Oj9XHng6wAKN1S6DgGsL2qAniLeubF3FHj0 Omc8vMq/kvxQR/XWjkKZlac= X-Google-Smtp-Source: ABdhPJytxIKlOBIIqZpZuAYMSpmIP34nE2JS6VexfJLbd1A3Qbn0WgttJR+JbJE5UM528ibPSyOWWg== X-Received: by 2002:adf:f7c1:: with SMTP id a1mr10459276wrq.399.1602943389522; Sat, 17 Oct 2020 07:03:09 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Huacai Chen , Paul Burton , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Aleksandar Rikalo , Aleksandar Markovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 05/44] target/mips: Demacro helpers for . Date: Sat, 17 Oct 2020 16:02:04 +0200 Message-Id: <20201017140243.1078718-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201017140243.1078718-1-f4bug@amsat.org> References: <20201017140243.1078718-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Aleksandar Markovic Remove function definitions via macros to achieve better code clarity. Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <1602103041-32017-2-git-send-email-aleksandar.qemu.devel@gmail.= com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/fpu_helper.c | 59 ++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 56beda49d82..f851723f22d 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; \ + +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; } -FLOAT_UNOP(abs) -FLOAT_UNOP(chs) -#undef FLOAT_UNOP =20 /* MIPS specific unary operations */ uint64_t helper_float_recip_d(CPUMIPSState *env, uint64_t fdt0) --=20 2.26.2