From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by sourceware.org (Postfix) with ESMTPS id 79C2F3858434 for ; Tue, 4 Jan 2022 14:05:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 79C2F3858434 Received: by mail-qt1-x82b.google.com with SMTP id p19so34087784qtw.12 for ; Tue, 04 Jan 2022 06:05:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Rt5USs2xAZUfVA6mLf5KEdkSw3ITUF/n+ROtLvtx35s=; b=VislvReOJj0Lr30IIDOFcZjw741i0pvppBkVg+SSj1ql/C3zPJupxp4gqF/HPFrgiJ p4q/cv6vW9IbGz96tLa/vm0y14tIrKWojYTbLd+By7FmT6BPZrGMHUlISCdevud41ThA ZMLiLLGY2+oX7mG0jj7ELoJXii60f8+f0FgR8Eq2Cq2h+GWwa1sR1VTX2lfKNx60S1LG FPGo1nPrd1ytJmAUKcP5VwlyrbhnwkU64UWl0gJIAws4y1JPpP4D05s2qQVxs0kLeSnl yxUQeUGwbH6FTug5ET4i0dI840sWfRqumOACAOjztLu2C22ccpCZmyZPU2+v+yIlHe+W GA/g== X-Gm-Message-State: AOAM532G/3bNKTxKhyfWmqwH47XEggAbh+e0/7OP8/WExy/ffIvOO9sr UVShtCS7sng5ZB+ZaPHtqFoD2y+llh8F9g== X-Google-Smtp-Source: ABdhPJyHe//Xd/wMOmkvou1ercRwWo17lEuaI+Xwpyqcrl5xefSceaQKW1FVoOuuH9scxI0z++m1bg== X-Received: by 2002:a05:622a:64c:: with SMTP id a12mr44306751qtb.312.1641305124838; Tue, 04 Jan 2022 06:05:24 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:a350:1960:9a87:fba4:a664? ([2804:431:c7ca:a350:1960:9a87:fba4:a664]) by smtp.gmail.com with ESMTPSA id y17sm33375211qtj.75.2022.01.04.06.05.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 06:05:24 -0800 (PST) Message-ID: <4197e084-cf83-be88-3bc3-6b2f38f62220@linaro.org> Date: Tue, 4 Jan 2022 11:05:23 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v2 06/14] LoongArch: Generic and soft-fp Routines Content-Language: en-US To: libc-alpha@sourceware.org References: <20211231064455.1030051-1-caiyinyu@loongson.cn> <20211231064455.1030051-7-caiyinyu@loongson.cn> From: Adhemerval Zanella In-Reply-To: <20211231064455.1030051-7-caiyinyu@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 04 Jan 2022 14:05:27 -0000 On 31/12/2021 03:44, caiyinyu wrote: > diff --git a/sysdeps/loongarch/e_sqrtl.c b/sysdeps/loongarch/e_sqrtl.c > new file mode 100644 > index 0000000000..cbc5802f74 > --- /dev/null > +++ b/sysdeps/loongarch/e_sqrtl.c > @@ -0,0 +1,38 @@ > +/* long double square root in software floating-point emulation. > + Copyright (C) 2021 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 > +#include > +#include > + > +long double > +__ieee754_sqrtl (const long double a) > +{ > + FP_DECL_EX; > + FP_DECL_Q (A); > + FP_DECL_Q (C); > + long double c; > + > + FP_INIT_ROUNDMODE; > + FP_UNPACK_Q (A, a); > + FP_SQRT_Q (C, A); > + FP_PACK_Q (c, C); > + FP_HANDLE_EXCEPTIONS; > + return c; > +} > +strong_alias (__ieee754_sqrtl, __sqrtl_finite) Use libm_alias_finite, the finite alias are deprecated and only provided as compat symbols. This is being replicated already on aarch64 and mips64, maybe we could add on a generic folder and use it instead.