From patchwork Mon May 13 08:14:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 89991 Return-Path: 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 A52FD386F81D for ; Mon, 13 May 2024 08:15:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A52FD386F81D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715588156; bh=Li5q0WP+zjrcUSuMM/6kg+HlxRr7YEpJXGhGZ1HYkXk=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Vd/Q1ZPRVQnXe5yZ/Cd2sTrmVFHdTwOaxautdvREXjRB0v8PBhYvbluJoTlMhlF5Q Jmg+Rcp8TAFxsWjcYg/A92kGGIyECRHJ4198kiW5mnlIsw9zkd5GHt+KSJFnmD33v3 IGoSDz0dPi/bZXSpkId7s0mOEDZan3m5hd0Fxzqw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by sourceware.org (Postfix) with ESMTPS id F227738449C0 for ; Mon, 13 May 2024 08:14:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F227738449C0 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 F227738449C0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.210.49 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715588088; cv=none; b=CByGMNkYNi8vjbvWTjohId73f/u425BMEo1Ia4dAS+CWfipP3yXOoMSHpEE5vHdKRjUwPJwISYxvX+ZWzkriwLelWfRd4tlvs7+InFWQw5j5mQakushkbITRRnbuz/FB8YQFTlw4MKrvZ/cDDzoj/xiVR54xC2eNEVbJzGB/9AI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715588088; c=relaxed/simple; bh=PPvXH6SrvdgdO520sg1SiNjnjOs1ty67YpxgYkbUyL0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=KpeGWix4VW52ZhNx77epmQ4Ibb6nuQeTlRBRYwOI8+y0VlGocW8Rm1bdyJnxgp2FBws+Lk6/Ci47syWGFuEIaBkho+BRtW7PMHcrnsI3bXl8eZlGBnKXfe4Ic7zDVbBCNeznxi1qkLQCzdNATLT5EumHPpArmn1RPa4s9fLTU38= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6f1027cf826so614612a34.1 for ; Mon, 13 May 2024 01:14:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715588077; x=1716192877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Li5q0WP+zjrcUSuMM/6kg+HlxRr7YEpJXGhGZ1HYkXk=; b=W6Y5cJcaj3XO3KR6zopc5Wm2cFbIk3VffiwwNX3hc4FxGexdvShNrqoACmN4v04koB avEZWarQ3Q16R8M2m3ypZrV8ZJkaEicirT4j41qlIpibxKxWA9mw8LCtpGcvXn2MjHnh 64GpR7ldurEpUZ73OUNIsbZZklAVGvJVOHhm6C2IbdQUIpAr6+Qkc2kSqadgOtmB4IAe f3u60vtKUWoLT6LdJmZQq02Fg/RhE73DwVj8ci8p12UTG4OrTEHQBznvUTJj1hsUAA/z vvVRXo56hvK7nx5PSUkmrcNlWk+ffDmWEI8HEmm/9/MaYxDyw8Pr4e4xlHQk5S3Ovu77 BcpA== X-Gm-Message-State: AOJu0YxCfad+s2hODcanZDy+VwpsqKvy1gVXoYYJnG8MwIwVhF6HdCLw 7yiELb3JWuDDq/Y0aO1/1bD5PrMuNtgTTj/o8Xv2SvNZsMUmZ2BJi/ZXzZBH X-Google-Smtp-Source: AGHT+IFva7y51xGAmzevdzIVpBtKsmIvoeJLJ79gxSskzIUKUk0/263bABt3Y6OAQ0H86GnevmqYcA== X-Received: by 2002:a9d:4d1a:0:b0:6f0:5203:4fb5 with SMTP id 46e09a7af769-6f0e913d608mr10206772a34.20.1715588076887; Mon, 13 May 2024 01:14:36 -0700 (PDT) Received: from localhost.localdomain ([2409:8700:2482:720:5054:ff:fe12:3456]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340c99b41dsm7219999a12.52.2024.05.13.01.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 01:14:36 -0700 (PDT) From: YunQiang Su To: libc-alpha@sourceware.org Subject: [PATCH 1/6] MIPSr6/math: Use builtin fma and fmaf Date: Mon, 13 May 2024 16:14:24 +0800 Message-Id: <20240513081429.1749898-2-syq@gcc.gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240513081429.1749898-1-syq@gcc.gnu.org> References: <20240513081429.1749898-1-syq@gcc.gnu.org> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 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_H3, RCVD_IN_MSPIKE_WL, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org 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) +# 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