From patchwork Tue Jun 9 21:33:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 39545 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 8D452388C026; Tue, 9 Jun 2020 21:33:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D452388C026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1591738409; bh=wH86W7QDoo7ji6nMm++jF04pg9YPb+ECjkrMrR2hbBc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=t7mjfWOLz9fclEIMTfecDusHYb1SkH151J5hMBEVy0qrusS7HCdJBDkcgkgGqdwGU ZsbhcRlFX2hmobemls0Y90Y6smpCd5Is9W4v9o6rVYOwhbOo65Zxtx6hzp9/T6h/q5 5rlNFFzdkXlwROhHezCNL74+spI77+48nadteGJI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by sourceware.org (Postfix) with ESMTPS id 04B35388C026 for ; Tue, 9 Jun 2020 21:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04B35388C026 Received: by mail-qv1-xf44.google.com with SMTP id di13so73130qvb.12 for ; Tue, 09 Jun 2020 14:33:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wH86W7QDoo7ji6nMm++jF04pg9YPb+ECjkrMrR2hbBc=; b=Pzdbf4JoXd/kAvVl+p5KPUcJCOadsCMTRd7bWagX4hmR1eSgIZDEWecqBrnsiQSjtp jwyRUNp0xwwhZbYFsmIjYkDuasfD5Hji93I5/3/bo+7LceiTzpUVZfam6Eik1JQwN+mM UMRRCYuE5BAqKhYwB+UWB0ZsqqXdx6Olq5gG4gpt1T+Hou9GP2mQGvOaYBlVKnRrOA8D 8X904pcS8nmfy/tJsMYj0i6m1Hzh7SbPWxtHR5uGm0Ty8OuGhx2eLJN7qEoQMoim/zaB CdOf0cff1TMI7RDuNoPp7wLj9x9OgJGu7G7o+Ehobgue3onEo2tBBOpD0Xd5sXJHeVqJ +dhQ== X-Gm-Message-State: AOAM533Vu+NQtaE3oROWlojvAdYG/UHjt/mlqmwjwwIkDPg/HL3FgBUp foWGum40WlTtRvSXX6YC7wgaxkSZHRU= X-Google-Smtp-Source: ABdhPJzG9z4Yn4Ja21VwIP96mB34117TItpUfuNTGgdSkpypgYjydfI29LsKCyf6aIe7Q+FGA6tnuw== X-Received: by 2002:a05:6214:170e:: with SMTP id db14mr109845qvb.113.1591738405357; Tue, 09 Jun 2020 14:33:25 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id d193sm10746214qke.124.2020.06.09.14.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 14:33:24 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 13/13] m68k: Use sqrt{f} builtin for coldfire Date: Tue, 9 Jun 2020 18:33:01 -0300 Message-Id: <20200609213301.3591135-13-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200609213301.3591135-1-adhemerval.zanella@linaro.org> References: <20200609213301.3591135-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Checked with a build for m68k-linux-gnu-coldfire. --- sysdeps/m68k/coldfire/fpu/e_sqrt.c | 26 ------------------ sysdeps/m68k/coldfire/fpu/e_sqrtf.c | 27 ------------------- .../coldfire/fpu/math-use-builtins-sqrt.h | 4 +++ 3 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 sysdeps/m68k/coldfire/fpu/e_sqrt.c delete mode 100644 sysdeps/m68k/coldfire/fpu/e_sqrtf.c create mode 100644 sysdeps/m68k/coldfire/fpu/math-use-builtins-sqrt.h diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrt.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c deleted file mode 100644 index c67630d1b8..0000000000 --- a/sysdeps/m68k/coldfire/fpu/e_sqrt.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2006-2020 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 - . */ - -#include - -double -__ieee754_sqrt (double x) -{ - asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x)); - return x; -} -libm_alias_finite (__ieee754_sqrt, __sqrt) diff --git a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c deleted file mode 100644 index c2e4928957..0000000000 --- a/sysdeps/m68k/coldfire/fpu/e_sqrtf.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2006-2020 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 - . */ - -#include - -float -__ieee754_sqrtf (float x) -{ - double result; - asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x)); - return result; -} -libm_alias_finite (__ieee754_sqrtf, __sqrtf) diff --git a/sysdeps/m68k/coldfire/fpu/math-use-builtins-sqrt.h b/sysdeps/m68k/coldfire/fpu/math-use-builtins-sqrt.h new file mode 100644 index 0000000000..e94c915ba6 --- /dev/null +++ b/sysdeps/m68k/coldfire/fpu/math-use-builtins-sqrt.h @@ -0,0 +1,4 @@ +#define USE_SQRT_BUILTIN 1 +#define USE_SQRTF_BUILTIN 1 +#define USE_SQRTL_BUILTIN 0 +#define USE_SQRTF128_BUILTIN 0