Message ID | 20240513081945.1842029-1-syq@gcc.gnu.org (mailing list archive) |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 230963844073 for <patchwork@sourceware.org>; Mon, 13 May 2024 08:20:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 230963844073 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715588445; bh=JDgEILLloSAwDurHy0853ZfgA4+OSK/ikKrWrEEo4fc=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=vIkfdV4jAuJQGNGSIThrFWu/ERWym3Lqy1a22GFI72lrU71BwSgb6wmq7NZVs7jyI lNUhelp3dLg2+sUGjM4p9XoM9QX/nH5d7+XoLzfZzFqOE//H++iosE4P5Z1pTcNogk maFaYrk2RqWiWW4GYo9B4j8DN7EOPCjiGS+wF2t4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by sourceware.org (Postfix) with ESMTPS id 9954B386F814 for <libc-alpha@sourceware.org>; Mon, 13 May 2024 08:19:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9954B386F814 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 9954B386F814 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.167.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715588394; cv=none; b=WJgPEM4YZkH0yj0c2/NaAAXKHzuHIT5YCS2sFtfubvOyggWTHdQKxLsA71pip9i094d/zLT4ArhDi2BJie24zjsJpQE0Nzby6EwRPLr1baxNGCfDqE8zxhhKDZ2HnavplN7s8eyoEyHw/Fcc8ZgXkKFcrhKFi2VntPl511hdA4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715588394; c=relaxed/simple; bh=QxyvxN503koVEr4OF7ZVr0hBUc8DTMpJZOsiFwSfw9M=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=pc3s6hFcB9bV6JyRnss3FmEJj07lSG9s0SW1DABe7VemiDYkCskio3Al3PhJidHOCxVGk6G4CLWDoxhlozLLhNY6Lz2s9YgaQHUchMIJjFS/MPFzpPZuIg78mNr/eN99G3Jz5gPOB9JGJS7oI8Su7Z85OCFE11pE0dGuhQzMDpI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3c96a556006so2325695b6e.0 for <libc-alpha@sourceware.org>; Mon, 13 May 2024 01:19:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715588389; x=1716193189; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JDgEILLloSAwDurHy0853ZfgA4+OSK/ikKrWrEEo4fc=; b=eFWGM4Cp6ij/8FBqiSFopSBxFa29oF0yZ46hUN5vuxVaySAgdFyOcKV0bOX/SVDvJE ovDk0f0AFGg+S7smqdncC3AAoL60jCsXetDaOO4tcF+JKCShthCx5vMzQXXkw3nMfQjG 614CGWOGx64h8GRcKUDk4Xnb45KfhzWxQ0h4oMUd3I2dJCt1M9QY/pgiR4OTzvegi5RW GC1LX51giAiJZzQz01dILYqEioDIdBfu6xQxDd+v4zAk/dqvvWjB6xFuKvx1+CtDQKpE yFzxfcJveGQ0KTjXR5xLJJOIgELHev0w6z7X+8Raac2MEdOpSF+85ZmyQWwUH0SVNGHF +MvQ== X-Gm-Message-State: AOJu0Yw/W9YS2KOvqDY20vixKyF3vUTPBGxyKlDhvHTIBcAhb5kWChVo /epJGRXrns8r1vkkCMTwOpQk926YSs6nxLpbQCIKiCOzTQXXHXKEqJVLAL2r X-Google-Smtp-Source: AGHT+IFUQdu7EJylCSEhJcB/19Nj+RVDrZf2am1NDhrp1T8nQyMz6qhN6MjJNvC47z8bXpMV4TgrCA== X-Received: by 2002:aca:1c02:0:b0:3c9:6f67:1d9a with SMTP id 5614622812f47-3c997058cbamr9901494b6e.21.1715588389213; Mon, 13 May 2024 01:19:49 -0700 (PDT) Received: from localhost.localdomain ([2409:8700:2482:720:5054:ff:fe12:3456]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a8146csm6874455b3a.50.2024.05.13.01.19.48 for <libc-alpha@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 01:19:48 -0700 (PDT) From: YunQiang Su <syq@gcc.gnu.org> To: libc-alpha@sourceware.org Subject: [PATCHv2 1/6] MIPSr6/math: Use builtin fma and fmaf Date: Mon, 13 May 2024 16:19:45 +0800 Message-Id: <20240513081945.1842029-1-syq@gcc.gnu.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |
Series |
[PATCHv2,1/6] MIPSr6/math: Use builtin fma and fmaf
|
|
Commit Message
YunQiang Su
May 13, 2024, 8:19 a.m. UTC
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 <syq@gcc.gnu.org>
---
sysdeps/mips/fpu/math-use-builtins-fma.h | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 sysdeps/mips/fpu/math-use-builtins-fma.h
Comments
On 13/05/24 05:19, 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 <syq@gcc.gnu.org> > --- > sysdeps/mips/fpu/math-use-builtins-fma.h | 4 ++++ > 1 file changed, 4 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..176cfd259b > --- /dev/null > +++ b/sysdeps/mips/fpu/math-use-builtins-fma.h > @@ -0,0 +1,4 @@ > +#define USE_FMA_BUILTIN (__mips_isa_rev >= 6 && !defined (__mips_single_float)) > +#define USE_FMAF_BUILTIN (__mips_isa_rev >= 6) > +#define USE_FMAL_BUILTIN 0 > +#define USE_FMAF128_BUILTIN 0 I think the previous version is better, because with clang this leads to an warning due undefined behavior: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] 8 | #if USE_FMA_BUILTIN
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..176cfd259b --- /dev/null +++ b/sysdeps/mips/fpu/math-use-builtins-fma.h @@ -0,0 +1,4 @@ +#define USE_FMA_BUILTIN (__mips_isa_rev >= 6 && !defined (__mips_single_float)) +#define USE_FMAF_BUILTIN (__mips_isa_rev >= 6) +#define USE_FMAL_BUILTIN 0 +#define USE_FMAF128_BUILTIN 0