public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: Evandro Menezes <e.menezes@samsung.com>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	nd <nd@arm.com>,        Andrew Pinski <pinskia@gmail.com>
Subject: Re: [PATCH 2/4 v2][AArch64] Add support for FCCMP
Date: Thu, 21 Jan 2016 22:07:00 -0000	[thread overview]
Message-ID: <20160121220712.GA25892@arm.com> (raw)
In-Reply-To: <56A13867.3010103@samsung.com>

On Thu, Jan 21, 2016 at 01:58:31PM -0600, Evandro Menezes wrote:
> Hi, James.
> 
> On 01/21/16 03:24, James Greenhalgh wrote:
> >On Wed, Jan 06, 2016 at 02:44:47PM -0600, Evandro Menezes wrote:
> >>On 01/06/2016 06:04 AM, Wilco Dijkstra wrote:
> >>>>Here's what I had in mind when I inquired about distinguishing FCMP from
> >>>>FCCMP.  As you can see in the patch, Exynos is the only target that
> >>>>cares about it, but I wonder if ThunderX or Xgene would too.
> >>>>
> >>>>What do you think?
> >>>The new attributes look fine (I've got a similar outstanding change), however
> >>>please don't add them to non-AArch64 cores. We only need it for thunderx.md,
> >>>cortex-a53.md, cortex-a57.md, xgene1.md and exynos-m1.md.
> >>         Add support for the FCCMP insn types
> >>
> >>         2016-01-04  Evandro Menezes  <e.menezes@samsung.com>
> >>
> >>         gcc/
> >>             * config/aarch64/aarch64.md (fccmp): Change insn type.
> >>             (fccmpe): Likewise.
> >>             * config/aarch64/thunderx.md (thunderx_fcmp): Add
> >>    "fccmp{s,d}" types.
> >>             * config/arm/cortex-a53.md (cortex_a53_fpalu): Likewise.
> >>             * config/arm/cortex-a57.md (cortex_a57_fp_cmp): Likewise.
> >>             * config/arm/xgene1.md (xgene1_fcmp): Likewise.
> >>             * config/arm/exynos-m1.md (exynos_m1_fp_ccmp): New insn
> >>    reservation.
> >>             * config/arm/types.md (fccmps): Add new insn type.
> >>             (fccmpd): Likewise.
> >>
> >>Got it.  Here's an updated patch.  Again, assuming that your
> >>original patch is in place.  Perhaps you can build on it.
> >If we don't have any targets which care about the fccmps/fccmpd split in
> >the code base, do we really need it? Can we just follow the example of
> >fcsel?
> 
> The Exynos M1 does care about the difference between FCMP and FCCMP,
> as can be seen in the patch.

> More explicitly:
> 
>    (define_insn_reservation "exynos_m1_fp_cmp" 4
>       (and (eq_attr "tune" "exynosm1")
>            (eq_attr "type" "fcmps, fcmpd"))
>       "em1_nmisc")
> 
>    (define_insn_reservation "exynos_m1_fp_ccmp" 7
>       (and (eq_attr "tune" "exynosm1")
>            (eq_attr "type" "fccmps, fccmpd"))
>       "em1_st, em1_nmisc")
> 

I think I was unclear. Your exynos-m1 model cares about splitting fcmp[s/d]
and fccmp, but it doesn't care about splitting fccmp in to fccmps/fccmpd. It
is the split to fccmps/fccmpd that I think is unneccesary at this time.

> >>diff --git a/gcc/config/arm/types.md b/gcc/config/arm/types.md
> >>index 321ff89..daf7162 100644
> >>--- a/gcc/config/arm/types.md
> >>+++ b/gcc/config/arm/types.md
> >>@@ -70,6 +70,7 @@
> >>  ; f_rint[d,s]        double/single floating point rount to integral.
> >>  ; f_store[d,s]       double/single store to memory.  Used for VFP unit.
> >>  ; fadd[d,s]          double/single floating-point scalar addition.
> >>+; fccmp[d,s]         double/single floating-point conditional compare.
> >Can we follow the convention fcsel uses of calling out "From ARMv8-A:"
> >for this type?
> >
> 
> I'm not sure I follow.  Though I didn't refer to the ISA spec, I
> used the description from it for the *fccmp* type.
> 
> Please, advise.

Something like:

; fccmp    From ARMv8-A: floating point conditional compare.

Just to capture that this instruction is only available for cores implementing
ARMv8-A.

Thanks,
James

  parent reply	other threads:[~2016-01-21 22:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 10:33 Wilco Dijkstra
2015-12-15 16:42 ` James Greenhalgh
2015-12-15 17:20   ` Wilco Dijkstra
2015-12-16  0:08     ` Bernd Schmidt
2016-01-05 22:01 ` Evandro Menezes
2016-01-05 22:05   ` Andrew Pinski
2016-01-06 12:05   ` Wilco Dijkstra
2016-01-06 20:44     ` Evandro Menezes
2016-01-20 23:10       ` Evandro Menezes
2016-01-21  9:24       ` James Greenhalgh
2016-01-21 11:13         ` Wilco Dijkstra
2016-01-21 12:10           ` James Greenhalgh
2016-01-21 19:58         ` Evandro Menezes
2016-01-21 20:03           ` Evandro Menezes
2016-01-21 22:07           ` James Greenhalgh [this message]
2016-01-21 22:55             ` Evandro Menezes
2016-02-03 19:49               ` Evandro Menezes
2016-02-15 10:53               ` James Greenhalgh
2016-02-15 21:20                 ` Evandro Menezes
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18 16:27 Wilco Dijkstra

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=20160121220712.GA25892@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=e.menezes@samsung.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=pinskia@gmail.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).