From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by sourceware.org (Postfix) with ESMTPS id 06F4D3857363 for ; Fri, 5 Aug 2022 12:28:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 06F4D3857363 Received: by mail-vs1-xe30.google.com with SMTP id v128so2274876vsb.10 for ; Fri, 05 Aug 2022 05:28:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc; bh=3PL77W/KptDoN3WHLptVCz30WZ9QokBhbC4fFojsy3M=; b=FAlHQdLvlMmcZ2GXlu2mydzFs8bsl8iFOvUaQhOgGx+MUt577Zp6ep94BktxVkD+vm qkTMHvqGb92JW6ffCxPoOZB2WnZ7NaB5L9KwSVTwSih9LI9krgqUSyxykMgIqsNFcAMl bImKVvPp2iOSw2hDPmBBT4CpPj4hJSmWggnteHsMRLn+CnByApsC+k7yDL/8C7tOmXYF Vie09kEHn4gp/8iCqhLogT0lY81NKyXyq8HgkQlFFNnE5HP1AxxuvZXwcz1nAywlI+HM LoU6MdQe72U16BQQCbR0cJD6gyLyrq3u1W1V7wY9eYKl5EbeR07gwGw1gYekWeBqj/hA C62A== X-Gm-Message-State: ACgBeo3gdzCyaPVAIv09aw3wazQLKTXx7MOt8BRRTf3ENJDs47eDpP7g wdYLrMfxb3Jp/gXjHYJHT2bnvAfmQjS8sw== X-Google-Smtp-Source: AA6agR5iAl/I1xxXlHwLjpl08YpsWWouyIecKVpzP7L/sDJU2LPfJw1xdZHvsiIfYsa1oQBFjkHPQQ== X-Received: by 2002:a67:a246:0:b0:388:7e82:1d80 with SMTP id t6-20020a67a246000000b003887e821d80mr1543081vsh.26.1659702501228; Fri, 05 Aug 2022 05:28:21 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:930b:4c0:90c9:ffc5:cfdb? ([2804:431:c7ca:930b:4c0:90c9:ffc5:cfdb]) by smtp.gmail.com with ESMTPSA id d137-20020a1fb48f000000b00376e14a06e8sm2839171vkf.50.2022.08.05.05.28.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Aug 2022 05:28:20 -0700 (PDT) Message-ID: Date: Fri, 5 Aug 2022 09:28:18 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH] i386: Use fldt instead of fld on e_logl.S Content-Language: en-US To: "H.J. Lu" , Fangrui Song Cc: GNU C Library References: <20220804210016.2613403-1-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 12:28:23 -0000 On 04/08/22 18:35, H.J. Lu wrote: > On Thu, Aug 4, 2022 at 2:31 PM Fangrui Song wrote: >> >> On Thu, Aug 4, 2022 at 2:24 PM H.J. Lu wrote: >>> >>> On Thu, Aug 4, 2022 at 2:00 PM Adhemerval Zanella >>> wrote: >>>> >>>> Clang cannot assemble fldt in the AT&T dialect mode. >>>> --- >>>> sysdeps/i386/i686/fpu/e_logl.S | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S >>>> index 63183ac544..5d53f3bb22 100644 >>>> --- a/sysdeps/i386/i686/fpu/e_logl.S >>>> +++ b/sysdeps/i386/i686/fpu/e_logl.S >>>> @@ -43,7 +43,7 @@ ENTRY(__ieee754_logl) >>>> fsubl MO(one) // x-1 : x : log(2) >>>> 5: fld %st // x-1 : x-1 : x : log(2) >>>> fabs // |x-1| : x-1 : x : log(2) >>>> - fld MO(limit) // 0.29 : |x-1| : x-1 : x : log(2) >>>> + fldt MO(limit) // 0.29 : |x-1| : x-1 : x : log(2) >>>> fcomip %st(1) // |x-1| : x-1 : x : log(2) >>>> fstp %st(0) // x-1 : x : log(2) >>>> jc 2f >>>> @@ -76,7 +76,7 @@ ENTRY(__logl_finite) >>>> fsubl MO(one) // x-1 : x : log(2) >>>> fld %st // x-1 : x-1 : x : log(2) >>>> fabs // |x-1| : x-1 : x : log(2) >>>> - fld MO(limit) // 0.29 : |x-1| : x-1 : x : log(2) >>>> + fldt MO(limit) // 0.29 : |x-1| : x-1 : x : log(2) >>>> fcomip %st(1) // |x-1| : x-1 : x : log(2) >>>> fstp %st(0) // x-1 : x : log(2) >>>> jc 2b >>>> -- >>>> 2.34.1 >>>> >>> >>> I don't think this is correct since there are >>> >>> .type limit,@object >>> limit: .double 0.29 >>> >>> It should be fldl. >>> >>> -- >>> H.J. >> >> If I am not mistaken, the existing fld has a bug as it is treated as flds > > True. It doesn't seem to cause any issue. > >> fld limit@GOTOFF(%edx) # treated as flds >> flds limit@GOTOFF(%edx) >> fldl limit@GOTOFF(%edx) >> fldt limit@GOTOFF(%edx) >> >> .section .rodata.cst8,"aM",@progbits,8 >> .p2align 3 >> limit: .double 0.29 fldl works and it see the best option. Ok with this change?