Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Ulrich Drepper
On Tue, Mar 18, 2014 at 11:11 AM, Richard Biener wrote: > Btw, without this zeroing (where zero is also "undefined") this may > be an information leak and thus possibly a security issue? That is, > how is _mm_undefined_pd () specified? People aren't accidentally using the _mm*_undefined_*() func

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Richard Biener
On Tue, Mar 18, 2014 at 4:03 PM, Ulrich Drepper wrote: > On Tue, Mar 18, 2014 at 7:13 AM, Richard Biener > wrote: >> extern __inline __m512 >> __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) >> _mm512_undefined_ps (void) >> { >> __m512 __Y = __Y; >> return __Y; >> } > > >

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Richard Biener
On Tue, Mar 18, 2014 at 4:09 PM, Richard Biener wrote: > On Tue, Mar 18, 2014 at 4:03 PM, Ulrich Drepper wrote: >> On Tue, Mar 18, 2014 at 7:13 AM, Richard Biener >> wrote: >>> extern __inline __m512 >>> __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) >>> _mm512_undefined_ps

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Ulrich Drepper
On Tue, Mar 18, 2014 at 7:13 AM, Richard Biener wrote: > extern __inline __m512 > __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) > _mm512_undefined_ps (void) > { > __m512 __Y = __Y; > return __Y; > } This provokes no warnings (as you wrote) and it doesn't clobber flags,

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Richard Biener
On Tue, Mar 18, 2014 at 10:34 AM, Ilya Tocar wrote: > On 17 Mar 22:18, Ulrich Drepper wrote: >> On Mon, Mar 17, 2014 at 7:39 AM, Ilya Tocar wrote: >> >> > undefined is similar in behavior to setzero, but it also clobbers >> > flags. Maybe just define it to setzero for now? >> > >> > >> What do yo

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-18 Thread Ilya Tocar
On 17 Mar 22:18, Ulrich Drepper wrote: > On Mon, Mar 17, 2014 at 7:39 AM, Ilya Tocar wrote: > > > undefined is similar in behavior to setzero, but it also clobbers > > flags. Maybe just define it to setzero for now? > > > > > What do you mean by "clobbers flags"? Do you have an example? I've us

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-17 Thread Ulrich Drepper
On Mon, Mar 17, 2014 at 7:39 AM, Ilya Tocar wrote: > Do you know of any cases where xor is > generated (except for destination in gather/scatter) I don't have any code exhibiting this handy right now. I'll keep an eye out. > but it also clobbers > flags. Maybe just define it to setzero for no

Re: [PATCH] x86: Define _mm*_undefined_*

2014-03-17 Thread Ilya Tocar
On 16 Mar 07:12, Ulrich Drepper wrote: > [This patch is so far really meant for commenting. I haven't tested it > at all yet.] > > Intel's intrinsic specification includes one set which currently is not > defined in gcc's headers: the _mm*_undefined_* intrinsics. What specification are talking ab