From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id D02AD385829C for ; Thu, 4 Aug 2022 21:36:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D02AD385829C Received: by mail-pl1-x634.google.com with SMTP id o3so985951ple.5 for ; Thu, 04 Aug 2022 14:36:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=H6Z3bfC9dI9mUYKyJy/olXb2cE/5ThsLxXAg0mbbua8=; b=jKm8X77BMcIWjrgCQ8+tl/WpQ3X4IvY0JD4TJa6iYf0eKqPKF6fcMUu/ARzVnXl6z8 Hk9p4XeH08jJ1MidWg8LmEOWaah9ZVlbJYLExlitBD7YZYlcbGLnmmbZ0UZBtLTBi1DM brrufOlkZzSQLC1RPj4Z42/ogGnQHpsLUroh0n3jEFePuut5loMVx6fpncFC8aw5clHv 6Y2xMa2a1rZFL54gjLKL6UtPsrdxdqpid46yv2eBQOK5ZA+/kvWfsjH4NutIWXGRsQKO F2e5u+AQmtSN7mq/xnVC/4s/kW1MthT6CDyjDRSrvCamitCciLRC9cHrSvbjzqjfE5ik RDkA== X-Gm-Message-State: ACgBeo3nXZOrHRXZaLfVaEVs9nKw20lmwaSuZuIVe1zQMNRni78bfNNw uRKGDodYLvfui6RPqK8wEPpL7S6yctnfJt7m5QY= X-Google-Smtp-Source: AA6agR683HUrRWWrK3Z9LLoNo4uR7pDQE0pe2mafr8AIo8hNSfDmJ3xZK/H6aGEf0q2HVhUjPPOigdriMq7lUZcOn5Q= X-Received: by 2002:a17:90a:c690:b0:1f5:858e:f538 with SMTP id n16-20020a17090ac69000b001f5858ef538mr498872pjt.10.1659648980779; Thu, 04 Aug 2022 14:36:20 -0700 (PDT) MIME-Version: 1.0 References: <20220804210016.2613403-1-adhemerval.zanella@linaro.org> In-Reply-To: From: "H.J. Lu" Date: Thu, 4 Aug 2022 14:35:45 -0700 Message-ID: Subject: Re: [PATCH] i386: Use fldt instead of fld on e_logl.S To: Fangrui Song Cc: Adhemerval Zanella , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3024.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2022 21:36:23 -0000 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 -- H.J.