From owner-freebsd-arm@freebsd.org Fri Aug 19 03:36:31 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76594BBF91F for ; Fri, 19 Aug 2016 03:36:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4067C1E4C for ; Fri, 19 Aug 2016 03:36:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id x131so16732381ite.0 for ; Thu, 18 Aug 2016 20:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nAmrBjci5zcMnhF7ddWC75+XdwpeaFjakQN0TDM/QZs=; b=fOxwRT2UC7pEhPBJPcnxKInITK57l1/7U4BqgrySN54HjmQ+sWFp08hxvuBF8S77+z IZQxG4jjbvEZS4i0pn4eDzlJs588109g6XO1GYl16KHw2xIJTzk9ZoRG4/T2cvCx7F/+ W7Ehl36bgd1RuocJcRuANkZwvcz3uVtuj3/70drmJw/TN7hKq4SASU/97NHWuIs1uAsh ZMQbMLBwwR37O4FJ2Fkx+Y5gN1JbxzT41zEayzYgU+nmxeIPQCjeTGL7xFahERIC2auO 9p5lCkVjF2YI2JEVm9ur/LKcUk+5eoff4bDLP0B7844a32uTQsvCZ6ViRklOfC5CjPgC qVFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=nAmrBjci5zcMnhF7ddWC75+XdwpeaFjakQN0TDM/QZs=; b=bMT0vPPzbbOQdSgw9ofQd2R6nvfwIc4NEOl0R5ll7f036XT0msklLeVGNi+dMDiZES xQjMBeDxAvVGi2hupJD1SegPQrMjuuvaLm+sAzH20sl2DKFHQUNcyxNwlpRCusqviYk7 dhqjJr9osnBwo31EiYCvkN66UbwnTHW3LRIkRebY5UvUZv01ETNifoA13De7Y8VIZBTH AshAPBn8zzp4F4WASETNVHbIIUw7rTt4a2x8vz14jvBAlv1nXkIAhanROpSaX55H3K4E /CZrWBM9LMRS68/ndLlagLxcqMYzHRk0v7r8OYkIOw8nBwvdnpdlnjDfx4BMZTIsa+ue TH8Q== X-Gm-Message-State: AEkoouvkrnNyFB1hFg89R1MC2wPzoZMz28xC0UjjRFr94e5j4EdaGyO9rdu1k5hF4CnCiejFQAU5NyleX8iWtg== X-Received: by 10.36.17.20 with SMTP id 20mr3729303itf.94.1471577790642; Thu, 18 Aug 2016 20:36:30 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Thu, 18 Aug 2016 20:36:30 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: From: Warner Losh Date: Thu, 18 Aug 2016 21:36:30 -0600 X-Google-Sender-Auth: AYnEUeBd-JBJmWXHkBUbCRJRbtM Message-ID: Subject: Re: libm long double functions on ARMv6. To: Kyle Evans Cc: "freebsd-arm@freebsd.org" , Ngie Cooper Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2016 03:36:31 -0000 On Wed, Aug 17, 2016 at 10:41 PM, Kyle Evans wrote: > Alright, apologies for the noise. I answered my own question- went > through the `long double` functions from msun/Makefile:101, and found > that `fmodl` seems to be the only one that is not properly aliased. > > The issue at [1] (r199422) seems to be relevant, so I'm CC'ing both > emaste@ and ngie@ as interested parties, also hoping for some > $0.02USD. > > I'm inlining a proposed patch at the end of this e-mail to match what > is currently done for all of the other `long double` functions on > these platforms where long double == double. > > [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199422 > > diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c > index 720aa03..a3578a1 100644 > --- a/lib/msun/src/e_fmod.c > +++ b/lib/msun/src/e_fmod.c > @@ -130,3 +130,8 @@ __ieee754_fmod(double x, double y) > } > return x; /* exact output */ > } > + > +#if LDBL_MANT_DIG == 53 > +__weak_reference(fmod, fmodl); > +#endif This change looks good. Are there other functions that need this same treatment? And shouldn't this be #if LDBL_MANT_DIG == DBL_MANT_DIG instead? Warner