From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23296 invoked by alias); 21 Jan 2019 17:10:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23287 invoked by uid 89); 21 Jan 2019 17:10:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Performance X-HELO: mail-oi1-f193.google.com Received: from mail-oi1-f193.google.com (HELO mail-oi1-f193.google.com) (209.85.167.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Jan 2019 17:10:37 +0000 Received: by mail-oi1-f193.google.com with SMTP id y1so15072120oie.12 for ; Mon, 21 Jan 2019 09:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iOJ9W0nfsUFE+sZzO2R3vJQdTfV/ofYUfIPj9GaD9KI=; b=dwkZ0MV9Yk8CvSv+Rhh3UrmWaT++8wQgzwaWy2pq4XwrK7tLltgcMyejSCNjUgEJFV fkwIy6+38V9XnybRNy9I3lW8BhRzNhJ/FqMEcxRb0yCE5+qMW7zNegnGlFzaCGUzhF9V 7fWa+zgt41t61ztxWe8jXSl88QAHAoqJDOAFo6BhnCrd7V0h+X+wJncPKj89nUxckYva TjT+93iBZc8maf8TSG/FfbKSUlqMOAXJ3ZhjBHPLP2E66mc0fPJ089NFdTBrrBjo7xV2 48ezaoR63AkSi1QuuCuDrb5xHIU15pNb+5HGRte6vMftCcOp/0WVe7gPEeTeKNus7Nfs BiPQ== MIME-Version: 1.0 References: <20190121161546.2900-1-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 21 Jan 2019 17:10:00 -0000 Message-ID: Subject: Re: [PATCH] x86-64: Use TI->SF and TI->DF conversions in soft-fp To: Uros Bizjak , Wei Xiao , "Guo, Xuepeng" , Hongtao Liu Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg01224.txt.bz2 On Mon, Jan 21, 2019 at 8:59 AM Uros Bizjak wrote: > > On Mon, Jan 21, 2019 at 5:56 PM H.J. Lu wrote: > > > > On Mon, Jan 21, 2019 at 8:43 AM Uros Bizjak wrote: > > > > > > On Mon, Jan 21, 2019 at 5:15 PM H.J. Lu wrote: > > > > > > > > TI->SF and TI->DF conversions in libgcc2.c: > > > > > > > > FSTYPE > > > > FUNC (DWtype u) > > > > { > > > > ... > > > > } > > > > > > > > have no rounding mode support. We should replace __floattisf, __floattidf, > > > > __floatuntisf and __floatuntidf in libgcc2.c with these from soft-fp. > > > > > > > > PR libgcc/88931 > > > > * config/i386/64/t-softfp-compat (libgcc2-ti-functions): New. > > > > (LIB2FUNCS_EXCLUDE): Likewise. > > > > (libgcc2-ti-softp): Likewise. > > > > (LIB2ADD): Likewise. > > > > --- > > > > libgcc/config/i386/64/t-softfp-compat | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/libgcc/config/i386/64/t-softfp-compat b/libgcc/config/i386/64/t-softfp-compat > > > > index 0978695c3a4..abb78032bf5 100644 > > > > --- a/libgcc/config/i386/64/t-softfp-compat > > > > +++ b/libgcc/config/i386/64/t-softfp-compat > > > > @@ -13,3 +13,11 @@ libgcc2-tf-functions = _divtc3 _multc3 _powitf2 > > > > LIB2FUNCS_EXCLUDE += $(libgcc2-tf-functions) > > > > libgcc2-tf-compats = $(addsuffix .c, $(libgcc2-tf-functions)) > > > > LIB2ADD += $(addprefix $(srcdir)/config/i386/64/, $(libgcc2-tf-compats)) > > > > + > > > > +# Replace _floatdisf, _floatdidf, _floatundisf and _floatundidf in > > > > +# libgcc2.c, which have no rounding mode support, with floattisf.c, > > > > +# floattidf.c, floatundisf.c and floatundidf.c from soft-fp. > > > > +libgcc2-ti-functions = _floatdisf _floatdidf _floatundisf _floatundidf > > > > +LIB2FUNCS_EXCLUDE += $(libgcc2-ti-functions) > > > > +libgcc2-ti-softp = floattisf.c floattidf.c floatuntisf.c floatuntidf.c > > > > +LIB2ADD += $(addprefix $(srcdir)/soft-fp/, $(libgcc2-ti-softp)) > > > > > > It is not that simple. Please note that libgcc2 functions use FP > > > instructions in narrower mode (so, in effect still use FPU), while > > > soft-fp functions don't even touch the FPU, and do everything using > > > bit twiddling. I think that your change would introduce qoute > > > noticeable runtime regressions. > > > > > > > By "run-time regressions", did you mean performance or correctness? > > Performance. > We will check performance change. -- H.J.