public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>, Wei Xiao <wei3.xiao@intel.com>,
		"Guo, Xuepeng" <xuepeng.guo@intel.com>,
	Hongtao Liu <hongtao.liu@intel.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] x86-64: Use TI->SF and TI->DF conversions in soft-fp
Date: Mon, 21 Jan 2019 17:10:00 -0000	[thread overview]
Message-ID: <CAMe9rOqq4f6mPGPb8_SQhAm_k2z2qS8E0D6RNkrrFjhkt3PQWA@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4ZL97J75eVz7D3FpvzaO3oC9-W32wU3DBtew-S2R14tMQ@mail.gmail.com>

On Mon, Jan 21, 2019 at 8:59 AM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> On Mon, Jan 21, 2019 at 5:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Mon, Jan 21, 2019 at 8:43 AM Uros Bizjak <ubizjak@gmail.com> wrote:
> > >
> > > On Mon, Jan 21, 2019 at 5:15 PM H.J. Lu <hjl.tools@gmail.com> 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.

  reply	other threads:[~2019-01-21 17:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 16:16 H.J. Lu
2019-01-21 16:43 ` Uros Bizjak
2019-01-21 16:56   ` H.J. Lu
2019-01-21 16:59     ` Uros Bizjak
2019-01-21 17:10       ` H.J. Lu [this message]
2019-01-21 18:37         ` H.J. Lu
2019-01-21 23:48 ` Joseph Myers
2019-01-22  0:40   ` Terry Guo
2019-01-22  0:58     ` Joseph Myers
2019-01-22  1:34       ` H.J. Lu
2019-01-22  2:03         ` Joseph Myers
2019-01-23  8:19           ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMe9rOqq4f6mPGPb8_SQhAm_k2z2qS8E0D6RNkrrFjhkt3PQWA@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=ubizjak@gmail.com \
    --cc=wei3.xiao@intel.com \
    --cc=xuepeng.guo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).