From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id C8B49386C588 for ; Wed, 22 May 2024 13:42:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8B49386C588 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C8B49386C588 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716385339; cv=none; b=j69cVIaga/QJWt4ahSLzAXXCpXCGm1lEKUL17y+LPGO6xKsJVU/CNxmnXnzk2UklcLQipxaH+HSIbH1uWacZxtUKFLsoDKru3hQORgAxwwWfGv+ZuhLdaniEWMzu6FSj8SeRs5b5i8wYf3jTLCyOHSknEX0jeRIrgnEUf9VUxK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716385339; c=relaxed/simple; bh=p/NUStpvTx5HVeFbbN0Oi5KPbnH7+ID1qa2/XUlwmwA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=W384flIciKahpl8xCnrQad/ohIRcbx8sGQFWitK5ZeaRBB2vnYnJ3EMx2Wg4XFmWHTLs1EHrZDnWMQp3zXgVayOwxUUNhFItObB/4zSS0RniMm4D5I+BFCBPauBGA+RKGV2QNTYsTkYzRu4t4G3un61gGASUDj3jgzDUhEmpvng= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6f4dcc3eeb3so1030976b3a.0 for ; Wed, 22 May 2024 06:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716385337; x=1716990137; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=YW/hme4Va+HNZoNTS+ZEohrJwBAD3em7PuYtsDYaGxI=; b=gTHvZLvIFpdP6szfom1VRCM9wQRDwFZ+MCgphh7VCah3dpmE+r5NALi/DxUqGMGzsU XOiX4XCczZDJrs36yCa+SAeakb6faw7Ke1VGFhU3U8MYWn6xZRV9u/7sLiWDBwXJMhVX Zg5qc8yEIBKPbFB4y4nLe5st9Lq11aTaJZx3Bx6D+OwVxMHd3IHrJaJi3F4PxpSojXo/ Z3nEw0+YjzuAYIVvY25j030I5Injbai+4r8l5blCsI2bZPuZmWHg7r1Rzpm6lDErz6AM 7jXR7cCfyTHQqXZt81C5oBByqOkrIGQHzJjYPnXFY9X8V5NM6toQK8zzzRCSCEFIp8TM ft8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716385337; x=1716990137; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YW/hme4Va+HNZoNTS+ZEohrJwBAD3em7PuYtsDYaGxI=; b=bf9qOChW2oGiVSxOW/oiixLMwybu1q8lee0TPAy4STdmMjC5sSVkLkasf9XOV6QViH rg3d0xYeULBbEr+AbkjeS4K2UOXg0BDFwLk1wJ0Y/+08WTMy3WhiP4iGwIVrKqHMceX4 KU3a6ZzBmSR4zwGaq19VangIwgWu89FzVurOsP94gnFgIMoGwlzzxl1+R9j1vbW4D3vw INZFyo4nRINE3zgN1jOZQPfJSP81/mQ/Okr2jPqOsWGuSc4d499UtAFq8nuj5VJ0zB2w 8BfzYWi5d62xgsTm7HBUGgXVpNcFKGXH0hh9VOUzUKKLWfThAhhUF8qlzJAzHWF97Q36 +hHw== X-Forwarded-Encrypted: i=1; AJvYcCUPeGTxoia2wxDT1iGPjtuqEvZZN9KaW4smGk5fARcjSGhx5mYAj3RtA2wc3Y+LiL6vxCpOQmMP3KanY9I6ia9xvXonWFNVmBZw X-Gm-Message-State: AOJu0Yxk9EmuymLX/dptCkKgLbpnqNNzmBTVOqxBjZBF5YfHTIsSThag MoFwmxku3WBAQo+Rw5nOn8+iAyxCW2b9h35RdgIdPpDEncJiwntkzkiqbC8EhE63z7bjNVecY7Z y X-Google-Smtp-Source: AGHT+IFwySJJ2GwemHXMosJYtddWYSiARBO67ihxgoYgSq/cq7gH8FFxjOzGs/JF1Z1Ala7TCsIA/Q== X-Received: by 2002:a05:6a20:d817:b0:1af:6866:165a with SMTP id adf61e73a8af0-1b1f8822242mr2435298637.7.1716385336721; Wed, 22 May 2024 06:42:16 -0700 (PDT) Received: from [192.168.15.31] ([189.79.30.199]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a86a5asm22465996b3a.81.2024.05.22.06.42.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 06:42:15 -0700 (PDT) Message-ID: <32ca86c8-43bd-4b8b-9956-645124319063@linaro.org> Date: Wed, 22 May 2024 10:42:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] MIPSr6/math: Use builtin fma and fmaf To: YunQiang Su , libc-alpha@sourceware.org References: <20240513081429.1749898-1-syq@gcc.gnu.org> <20240513081429.1749898-2-syq@gcc.gnu.org> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240513081429.1749898-2-syq@gcc.gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 13/05/24 05:14, YunQiang Su wrote: > MIPSr6 has MADDF.s/MADDF.d instructions, which are fused. > > In MIPS ISA, double support can be subsetted. Only FMAF is enabled > for this case. > > * sysdeps/mips/fpu/math-use-builtins-fma.h > > Signed-off-by: YunQiang Su > --- > sysdeps/mips/fpu/math-use-builtins-fma.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > create mode 100644 sysdeps/mips/fpu/math-use-builtins-fma.h > > diff --git a/sysdeps/mips/fpu/math-use-builtins-fma.h b/sysdeps/mips/fpu/math-use-builtins-fma.h > new file mode 100644 > index 0000000000..6e296fd4c0 > --- /dev/null > +++ b/sysdeps/mips/fpu/math-use-builtins-fma.h > @@ -0,0 +1,13 @@ > +#if __mips_isa_rev >= 6 > +# if defined(__mips_single_float) Usually for a single case we write as '#ifdef __mips_single_float, also the identation is a single space. The rest look ok, gcc seems to emit the the MADDF.X even with pretty old versions (gcc 5.5.0). > +# define USE_FMA_BUILTIN 0 > +# else > +# define USE_FMA_BUILTIN 1 > +# endif > +# define USE_FMAF_BUILTIN 1 > +#else > +# define USE_FMA_BUILTIN 0 > +# define USE_FMAF_BUILTIN 0 > +#endif > +#define USE_FMAL_BUILTIN 0 > +#define USE_FMAF128_BUILTIN 0