From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by sourceware.org (Postfix) with ESMTPS id 3E7A33846423 for ; Tue, 25 Jun 2024 03:02:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3E7A33846423 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3E7A33846423 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.219.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719284541; cv=none; b=gd1BSy9UHF8qt5DXF0o/HnrJ9p9j4L4+RJdSgq8PKl3eSB1OOMA3vLt2BXGdV+66tdIMQT6e3UZ89+ZuXlV4LXFR331s6C2UMCOwaf8LOCwreTpdbHaNv8tnSjPI3W9uI2EZ4PK1HAoupkA69SycWds6Od13PnfbVQHdNpXLaGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719284541; c=relaxed/simple; bh=if0r5WYeyqU4iaHPoVbEeioG5TWCVK3HyN5nSDrdDf8=; h=MIME-Version:From:Date:Message-ID:Subject:To; b=CVZfGczl2ZMhIYTdjHv/mh9U7gOgbYpIHJDkMz1zyUC+EB7aYBUykrdYBzw5BuGPkAYmrcQnBLZFJ6ZVFkr4BZWCUdTY0L3gt2RPVS2G7GhzsnzRWIOC0z8bGuThZFP4/HCwohZfosy1rLfm0IQqmZy480OshiGZj3UqzAAP4yk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-e02bf947545so4678463276.0 for ; Mon, 24 Jun 2024 20:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719284539; x=1719889339; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IiNWKOOMdIRXdFJ330W4G2zZupp6M55YKqNQZr5jfBw=; b=QMxpIh16c9iroTxC91ULRHVARwSrJAYues20K/5qlE7l7qTRbZtP5lrnALf/GcNeLH vpoSgq2Ahb0mw2xyhCikn0LNUjCPTlpvEvc4y8Lq81Nv27SQwOHgRD/Dq1hBFNsNExlg E0+3EnbedEThm2vHHos/GXjgJlppGjIrG6+Yy1QjUlGXf8TBiMCkn8K02WtRi+iKT8KA kbxgoRSKMtRYqB9Z1mLS5hkceCBlNy2DsoqIB5pfjr22UXEOHbL6YRnnBbH2CKPSJUAw szmafsaBKNOronPiheYonGYqH4oMOOLFsd6CarqMm8vMoEeSOP93Sxrh687og1nSI2fB XNkg== X-Gm-Message-State: AOJu0YyAxAlJEwB0BOAbvXAH4VdEc0f4G43CZr4qd0D0sVKDiY50JUiN 1G0ffLKsms+aoVA5TJVO7wpJBai4Aj0a8TZKBaqFZNe1uk7akqmZaDV1J3PH X-Google-Smtp-Source: AGHT+IHGV8v1oOyj39XIJLW52Gh85P6IbAnIzfTT+97DQ8Nx8MQG/UN2GSv1RHq8Vy8zCrkujNr6kQ== X-Received: by 2002:a25:6851:0:b0:dcc:6112:f90d with SMTP id 3f1490d57ef6-e0304042a87mr5824001276.62.1719284539545; Mon, 24 Jun 2024 20:02:19 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e032327f82csm240303276.32.2024.06.24.20.02.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jun 2024 20:02:19 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-e02da9b2db7so4568632276.3 for ; Mon, 24 Jun 2024 20:02:19 -0700 (PDT) X-Received: by 2002:a25:ab24:0:b0:e02:bcc6:7448 with SMTP id 3f1490d57ef6-e0303f2aaa4mr5487042276.1.1719284539086; Mon, 24 Jun 2024 20:02:19 -0700 (PDT) MIME-Version: 1.0 References: <20240620160756.71295-1-syq@debian.org> In-Reply-To: <20240620160756.71295-1-syq@debian.org> From: YunQiang Su Date: Tue, 25 Jun 2024 11:02:07 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6] MIPSr6/math: Use builtin fma and fmaf To: libc-alpha@sourceware.org, "Andreas K. Huettel" Cc: adhemerval.zanella@linaro.org, macro@orcam.me.uk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,BODY_8BITS,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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: Gently ping and CC Andreas. YunQiang Su =E4=BA=8E2024=E5=B9=B46=E6=9C=8821=E6=97=A5=E5= =91=A8=E4=BA=94 00:08=E5=86=99=E9=81=93=EF=BC=9A > > From: YunQiang Su > > 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 | 36 ++++++++++++++++++++++++ > 1 file changed, 36 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..8528b77336 > --- /dev/null > +++ b/sysdeps/mips/fpu/math-use-builtins-fma.h > @@ -0,0 +1,36 @@ > +/* Copyright (C) 2024 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +/* 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. */ > + > +#include > + > +#if __mips_isa_rev >=3D 6 > +# ifdef __mips_single_float > +# 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 > -- > 2.39.3 (Apple Git-146) >