On Tue, May 09, 2017 at 02:33:00PM -0500, Steven Munroe wrote: > On Tue, 2017-05-09 at 12:23 -0500, Segher Boessenkool wrote: > > On Mon, May 08, 2017 at 09:49:57AM -0500, Steven Munroe wrote: > > > Thus I would like to restrict this support to PowerPC > > > targets that support VMX/VSX and PowerISA-2.07 (power8) and later. > > > > What happens if you run it on an older machine, or as BE or 32-bit, > > or with vectors disabled? > > > Well I hope that I set the dg-require-effective-target correctly because > while some of these intrinsics might work on the BE or 32-bit machine, > most will not.
That is just for the testsuite; I meant what happens if a user tries to use it with an older target (or BE, or 32-bit)? Is there a useful, obvious error message? > The situation gets more complicated when we start looking at the > SSE/SSE2. These headers define many variants of load and store > instructions that are decidedly LE and many unaligned forms. While > powerpc64le handles this with ease, implementing LE semantics in BE mode > gets seriously tricky. I think it is better to avoid this and only > support these headers for LE. Right. > And while some SSE instrinsics can be implemented with VMX instructions > all the SSE2 double float intrinsics require VSX. And some PowerISA 2.07 > instructions simplify implementation if available. As power8 is also the > first supported powerpc64le system it seems the logical starting point > for most of this work. Agreed as well. > I don't plan to spend effort on supporting Intel intrinsic functions on > older PowerPC machines (before power8) or BE. Just make sure if anyone tries anyway, there is a clear error message that tells them not to. Segher