From patchwork Fri Jun 11 23:33:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 458524 Delivered-To: patch@linaro.org Received: by 2002:a17:907:7409:0:0:0:0 with SMTP id gj9csp700265ejc; Fri, 11 Jun 2021 16:35:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQJyJuClFv3Dwr9u3UiNUEpTRMxArSfkzPhpbelUfbqOVKnfo8nPPgXZ3DdZpaWaKvf4Hk X-Received: by 2002:a37:d08:: with SMTP id 8mr6351192qkn.409.1623454532826; Fri, 11 Jun 2021 16:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623454532; cv=none; d=google.com; s=arc-20160816; b=fh1TSE86L57GhxL2L44yCHcvMpCw1siWRGQ17lYLfXZO6oCUp/uSgi26XxZ9PvwUIM YnvmqA2pqUUl23mmyK3cX4uvPNsJtJmsuR7HR7ZggE4GyGzMUZv3GZQPOeGsqDLni1ca HwkOqyaBAXabhfqxPPgHKJWl6pMn3kRXgZO6oGE8XFhDFso8jI99Ulwe7kTVgB0i9OAk Tr044SkyZr+qJGvcu3J5wf3L4vFX+JevxuKtVxRN8y8+OIsyWx7uPFDuvV+wPjkXm2f/ oNiiDalq0qpn0zbxD2BzaWyku/j30HBHmW6mwjYgF6Yyl+qduynmCtk3JiXLZZEOpRid nlNw== 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=xx5lp96zsjKDJqIzIsAiA4NHIQLDT9JH68RupV1IPlw=; b=uXRQFTEO3iV+WEAYb5uSbcbaJnDv2LfJb6+n1CJ6GNJx4+qQ8kqYE5mOIWQbo1ttre MucUXou7t1E6+7JVkAUvg4wvbKqKg7OnNs4vBMdwxn73StLrGJQ5pxcD0srd7vvy5zww Olftpxby9yDjFCo1kUMz5VzRvtGnZ0B3liRYgX4l9XZUlrKXVvUHzGnnTNSGCmOgdQn1 aEwhuyg/1CuSHxdXhR+I3REHb3toosT+VN6c3MgXu7dcogfAY9Nja1kvEkfLepCrwUfx llUpVsGZxdR6P5foXcUKzE0LUyOYScnbENeH2ny01j4UCkko63rJ4YR8BNjCC2ZZi6vN EsTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zp80zVLT; 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=fail (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 a17si5824073qvl.223.2021.06.11.16.35.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jun 2021 16:35:32 -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=fail header.i=@linaro.org header.s=google header.b=zp80zVLT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrqgW-0004Ib-48 for patch@linaro.org; Fri, 11 Jun 2021 19:35:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrqev-0004HJ-Ap for qemu-devel@nongnu.org; Fri, 11 Jun 2021 19:33:53 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:37883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrqes-0006OE-J8 for qemu-devel@nongnu.org; Fri, 11 Jun 2021 19:33:53 -0400 Received: by mail-pg1-x530.google.com with SMTP id t9so3655544pgn.4 for ; Fri, 11 Jun 2021 16:33:50 -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=xx5lp96zsjKDJqIzIsAiA4NHIQLDT9JH68RupV1IPlw=; b=zp80zVLTI2yxIcqQVMPFYfJ0GtXjqsomCwxeXX3g4X6x7nue9IWOGwmplkz9hWi+G0 AtqCvEC4nBPEkC+TEUhmtb7sJxo3BkLhcnERkmAwB8smCWBCXRv75KbQDNLRjJKwU8Rd cUnNQN3KNU9heSDpRyS6GUaM4JO08NDRc8EBde2qEW1I8ZfAiHOTl2VrcHOohYhNcje5 iyumvNAL8XmQEawMGxtvlUOtC4yAvoHTEphPW9H9Lnv1D06kEEMrbWcJkcw9gGZ1G6uz 3rtudgOi4hpBcqea9tvhJf7gkjYYhFJgfM3N/cLO62+M0DMBB9wJxotO8KJ66rea9Yqy a55w== 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=xx5lp96zsjKDJqIzIsAiA4NHIQLDT9JH68RupV1IPlw=; b=eYjTWqeK1gKoEbtFk46+Bt1rJh7IoRdigo054KJxC9m8ZCBTzvbrCMC/JRPB9xHTEE 3aZSYNboDx7OdlycjRgRhjqH4dkyE6HAx+empLzN+0OXzgAgq6CxRbYxg4Uc1sSY4d0R w5BExn3RvRRBfsfOgsWOlcQs4nKO2/RXS7OvmK3mGrWlpbKz2H2dpmLrHwejYQk+83nd wNl4qOyXn//JuL27itjZHC+IGq9X1HMxsds0kbOlae7tvramZwqVNyW5KoARhd3U68wr BdpijIr8ogTy5AfMHjznNR7hTbDaZ0PD2ug8KgIkTsTp2pPwYDexl/BxSJYs8YJd7yI4 k0Ng== X-Gm-Message-State: AOAM533XqeAOFgPRD/E0WG7zC2JT1rfjzYuXOX6rbsIehr1dicSWbC7r RTfdPFTz9S5f/ey5+CYNvliF29Fu17Ultg== X-Received: by 2002:a62:2901:0:b029:28e:ef3d:10d2 with SMTP id p1-20020a6229010000b029028eef3d10d2mr10496083pfp.45.1623454429242; Fri, 11 Jun 2021 16:33:49 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id m134sm6349606pfd.148.2021.06.11.16.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 16:33:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 2/8] softfloat: Use _Generic instead of QEMU_GENERIC Date: Fri, 11 Jun 2021 16:33:41 -0700 Message-Id: <20210611233347.653129-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611233347.653129-1-richard.henderson@linaro.org> References: <20210611233347.653129-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: pbonzini@redhat.com, thuth@redhat.com, ehabkost@redhat.com, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson --- 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 1cb162882b..6f4aea7dee 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) {