From patchwork Wed Jun 16 01:36:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 461330 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp109078jae; Tue, 15 Jun 2021 18:36:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZE7bVDftM/YFMOBsA5Etd/rOrQy0KYv/ESy1MZ7B7sNIx3rrTPLTCJJ/Ej8X5UH2oou/M X-Received: by 2002:a92:d902:: with SMTP id s2mr1663778iln.278.1623807418587; Tue, 15 Jun 2021 18:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623807418; cv=none; d=google.com; s=arc-20160816; b=LYnEA7ItiLawBT85kSHKx2kMzBcSUcokITqN/82ptuHEKNMnq/6rowndYGg2ENSi1G MBf8eMbakpP2y+JsxyEzytdpAanwHTqef885gqi2qMUBqiAB8jxlqkuZEYvvZ6PHu0pK Hm4MH0bfn6zORzsUWVQGOf2GoBmQAUZf9yi5AuebMu0i0b/2b4yM46B+c37nX4CISoTN hyOP+9jNqGA0yDW3ClwLnAdLHM37vFAwnRjA7PLiD5odOnxksevwaQiGXsXmCEcULUFz kZBdDdjcz4xrOkVilIspEt93bdXtpOsvzpORkgWwuLqybbwQHDPw4EaL1vAvo9GhUIE+ Jzbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wj8nbktnS3Cds2QIKMNmDpFap8ymbqZ5pXLd4Gca9Xw=; b=JM835ZKqOLlE/u6rxG/5DQWXuDFum6k9Kl1h1w1TTVsp59B42+1wxiKcySNpL/KnnA ODFBZuuoV4fKL+Lgzb33G6JtAl2KwzHlmv80M+ca9CvI7Nj0BkmSX35KzHsflnTp5rcJ MUdlCx5gr+pFh+X8KL+REqjTWrQ3i/lDNHgdFWA6BVpmqHYodMrvjq8U8oksBCPzLGku xfbppSoo8jN/8TsQGJ7JVhN2XofYI8joVy7iUGT8i0qjuL3T2nobgMIqf8q4JZBYqTYo SFKOIH5XFnB8jtH0ci8vNbffA5+wRcIl//3WARQM1fqBp+nv2sS3YFjZgeL9NLXvLSG1 FPPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gvmw9isz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v4si946437jan.104.2021.06.15.18.36.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jun 2021 18:36:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gvmw9isz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltKUE-0008T6-2p for patch@linaro.org; Tue, 15 Jun 2021 21:36:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKTr-0008Pw-EF for qemu-devel@nongnu.org; Tue, 15 Jun 2021 21:36:35 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:35336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltKTp-0005bM-9A for qemu-devel@nongnu.org; Tue, 15 Jun 2021 21:36:35 -0400 Received: by mail-pj1-x102b.google.com with SMTP id fy24-20020a17090b0218b029016c5a59021fso3013059pjb.0 for ; Tue, 15 Jun 2021 18:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wj8nbktnS3Cds2QIKMNmDpFap8ymbqZ5pXLd4Gca9Xw=; b=gvmw9isz6VXpNdcl0Qe+pNodDzBX8QNL2bWGXfx/4x66MVXIzhp4HM0UKGCb16RxV2 PIyKSW7wwpm/J+z1fZeNYCZp0xGc4h95x+nDC9Qz4dHzZug6ZmulJFo+xUoWuXVPUKu5 Bmc4OXF/rrqX6LVPkRERESY+U15rT9gMNFTkWx+Ju/HZFpTiLshUyU4c+chJ08q/v2hu nPI/abLEJEX9rkBAUYBVp+tVzQaAdUj04Xt/BmKo+ts3zf+V5ShtWGTe9Ef66v51Dp0j A9jlJV5d9dlgQim9q1j7Gxf54OaXmmer9B9IfNUUQJd/Kt5YPb39URP+F+yLY+JlMtdb 3aIg== 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=wj8nbktnS3Cds2QIKMNmDpFap8ymbqZ5pXLd4Gca9Xw=; b=eZgzabsUnkYdelDXc1K6rjK/pl+2dyOLwfOnbhjMK+7Twf22HU9EU4qhcWQ18U8eZ0 m6i4fHKbDA0UR0x31INbqTsIL8fb+yAvCkwz6EwnSsFrWgA8EAMJSvLh8440EVRqnrqw Un6BeZZtkYwEDHeuD4Vu1zG0ImlzLhCet2JYylhTOlBEVRQXbceyld0DwyEw5ICO2o0R O9YRXBKJjljkgprH8NgfEb7nui9apEykztQvuNQUDMrhGQwzyWaTS9i8Jp2tn5/WFppl EN5oGTxJ2vAxPegskF8ca7hvs11azmlTl8A5S+5w9mwGJRu3XxSYELHRhMUrkkdrKdzz BTSQ== X-Gm-Message-State: AOAM533fIdDmpTxZWAtSG59AvGH6FCo9unLcG83n6uUquPExTSMi+lTg X9/Dd7rhpYQVSEmGuBJV5fAR0tsFeO5M7A== X-Received: by 2002:a17:90b:1489:: with SMTP id js9mr2171321pjb.227.1623807391881; Tue, 15 Jun 2021 18:36:31 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id o1sm321595pjf.56.2021.06.15.18.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 18:36:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/8] softfloat: Use _Generic instead of QEMU_GENERIC Date: Tue, 15 Jun 2021 18:36:23 -0700 Message-Id: <20210616013629.1458790-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210616013629.1458790-1-richard.henderson@linaro.org> References: <20210616013629.1458790-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.google.com 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, 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: peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Al?= =?utf-8?q?ex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20210614233143.1221879-3-richard.henderson@linaro.org> --- fpu/softfloat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.25.1 diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 4d0160fe9c..6e769f990c 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -686,11 +686,13 @@ static float128 float128_pack_raw(const FloatParts128 *p) #include "softfloat-specialize.c.inc" #define PARTS_GENERIC_64_128(NAME, P) \ - QEMU_GENERIC(P, (FloatParts128 *, parts128_##NAME), parts64_##NAME) + _Generic((P), FloatParts64 *: parts64_##NAME, \ + FloatParts128 *: parts128_##NAME) #define PARTS_GENERIC_64_128_256(NAME, P) \ - QEMU_GENERIC(P, (FloatParts256 *, parts256_##NAME), \ - (FloatParts128 *, parts128_##NAME), parts64_##NAME) + _Generic((P), FloatParts64 *: parts64_##NAME, \ + FloatParts128 *: parts128_##NAME, \ + FloatParts256 *: parts256_##NAME) #define parts_default_nan(P, S) PARTS_GENERIC_64_128(default_nan, P)(P, S) #define parts_silence_nan(P, S) PARTS_GENERIC_64_128(silence_nan, P)(P, S) @@ -892,11 +894,13 @@ static void parts128_log2(FloatParts128 *a, float_status *s, const FloatFmt *f); */ #define FRAC_GENERIC_64_128(NAME, P) \ - QEMU_GENERIC(P, (FloatParts128 *, frac128_##NAME), frac64_##NAME) + _Generic((P), FloatParts64 *: frac64_##NAME, \ + FloatParts128 *: frac128_##NAME) #define FRAC_GENERIC_64_128_256(NAME, P) \ - QEMU_GENERIC(P, (FloatParts256 *, frac256_##NAME), \ - (FloatParts128 *, frac128_##NAME), frac64_##NAME) + _Generic((P), FloatParts64 *: frac64_##NAME, \ + FloatParts128 *: frac128_##NAME, \ + FloatParts256 *: frac256_##NAME) static bool frac64_add(FloatParts64 *r, FloatParts64 *a, FloatParts64 *b) {