On Thu, Jan 11, 2018 at 10:25:25AM -0600, Bill Schmidt wrote:
> This patch adds a pattern for "ori 31,31,0" as a speculation barrier, and
> an associated built-in function.  This is currently restricted to Power7
> and later.  Documentation and test included.
> 
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.  Is
> this okay for trunk?

Tiny thing:

> 2018-01-11  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
> 
>       * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
>       (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
>       * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
>       MISC_BUILTIN_SPEC_BARRIER.
>       (rs6000_init_builtins): Likewise.
>       * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
>       enum value.
>       (speculation_barrier): New define_insn.
>       * doc/extend.texi: Document __builtin_speculation_barrier.
> 
> [gcc/testsuite]
> 
> 2018-01-11  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
> 
>       * gcc.target/powerpc/spec-barr-1.c: New file.

> --- gcc/doc/extend.texi       (revision 256364)
> +++ gcc/doc/extend.texi       (working copy)
> @@ -15734,6 +15734,7 @@ unsigned long __builtin_divdeuo (unsigned long, un
>  unsigned int cdtbcd (unsigned int);
>  unsigned int cbcdtd (unsigned int);
>  unsigned int addg6s (unsigned int, unsigned int);
> +void __builtin_speculation_barrier ();

void __builtin_speculation_barrier (void);

Okay for trunk with that fixed.  Pre-approved for backports, too, if you
want some.


Segher

Reply via email to