Hi Paul,

On Tue, Oct 02, 2018 at 09:11:57AM -0500, Paul Clarke wrote:
> This is a follow-on to earlier commits for adding compatibility
> implementations of x86 intrinsics for PPC64LE.  This is the first of
> two patches.  This patch adds 11 of the 13 x86 intrinsics from
> <pmmintrin.h> ("SSE3").  (Patch 2/2 adds tests for these intrinsics,
> and briefly describes the tests performed.)
> 
> Implementations are relatively straightforward, with occasional
> extra effort for vector element ordering.

Looks fine.

> Not implemented are _mm_wait and _mm_monitor, as there are no
> direct or trivial analogs in the POWER ISA.


>       * config.gcc (powerpc*-*-*): Add pmmintrin.h.

"... to extra_headers"?


> +#if 0
> +/* POWER8 / POWER9 have no equivalent.  */
> +
> +extern __inline void __attribute__((__gnu_inline__, __always_inline__, 
> __artificial__))
> +_mm_monitor (void const * __P, unsigned int __E, unsigned int __H)
> +{
> +  __builtin_ia32_monitor (__P, __E, __H);
> +#error "_mm_monitor is not supported on this architecture."
> +}
> +
> +extern __inline void __attribute__((__gnu_inline__, __always_inline__, 
> __artificial__))
> +_mm_mwait (unsigned int __E, unsigned int __H)
> +{
> +#error "_mm_mwait is not supported on this architecture."
> +}
> +#endif
> +
> +#endif /* _PMMINTRIN_H_INCLUDED */

Don't #if 0 the x86 implementation please; just say e.g.

/* POWER8 / POWER9 have no equivalent for __builtin_ia32_monitor and
   _mm_mwait.  */


Okay for trunk.  Thanks!


Segher

Reply via email to