Re: Validity of __asm__ transformation with "m" reference

2011-07-04 Thread Paulo César Pereira de Andrade
Jakub Jelinek wrote: > On Mon, Jul 04, 2011 at 03:49:58PM +0200, Michael Matz wrote: >> > But you said the operand is an int sized memory, while you expect >> > 4 times as big data with different alignment. >> > So you want "m"(*(__m128d *)) (or "m"(*(__m128i *)) ). >> >> Right. But even

Re: Validity of __asm__ transformation with "m" reference

2011-07-04 Thread Michael Matz
Hi, On Mon, 4 Jul 2011, Jakub Jelinek wrote: > No, what you can get out of that is e.g. optimizing away otherwise unneeded > large variable. > Consider: > static const int i[131072] = { 1, 2, 3, 4, 5 }; > void foo (void) > { > __asm volatile ("" : : "m" (i[0])); > } > By giving the asm just add

Re: Validity of __asm__ transformation with "m" reference

2011-07-04 Thread Jakub Jelinek
On Mon, Jul 04, 2011 at 03:49:58PM +0200, Michael Matz wrote: > > But you said the operand is an int sized memory, while you expect > > 4 times as big data with different alignment. > > So you want "m"(*(__m128d *)) (or "m"(*(__m128i *)) ). > > Right. But even then the replacement of a m

Re: Validity of __asm__ transformation with "m" reference

2011-07-04 Thread Michael Matz
Hi, On Fri, 1 Jul 2011, Jakub Jelinek wrote: > > GCC turns this into: > > "movaps%0, %%xmm0 > > shufps$27, %%xmm0, %%xmm0 > > movaps%1, %%xmm5 > > movaps%%xmm5, %%xmm6 > > " : : "m" costab_mmx[24], *"m" -2147483648*); > > > > The new constant might e

Re: Validity of __asm__ transformation with "m" reference

2011-07-01 Thread Martin Thuresson
Jacub, On Fri, Jul 1, 2011 at 12:04 PM, Jakub Jelinek wrote: > On Fri, Jul 01, 2011 at 11:45:16AM -0700, Martin Thuresson wrote: >> In recent versions of GCC I have seen a transformation of inline >> assembly that I'd like to confirm is valid. >> >> The code in question can be found in mplayer/mp

Re: Validity of __asm__ transformation with "m" reference

2011-07-01 Thread Jakub Jelinek
On Fri, Jul 01, 2011 at 11:45:16AM -0700, Martin Thuresson wrote: > In recent versions of GCC I have seen a transformation of inline > assembly that I'd like to confirm is valid. > > The code in question can be found in mplayer/mp3lib/dct64_sse.c > > "movaps%0, %%xmm0\n\t" >

Validity of __asm__ transformation with "m" reference

2011-07-01 Thread Martin Thuresson
In recent versions of GCC I have seen a transformation of inline assembly that I'd like to confirm is valid. The code in question can be found in mplayer/mp3lib/dct64_sse.c "movaps%0, %%xmm0\n\t" "shufps$27, %%xmm0, %%xmm0\n\t" "movaps%1, %%xmm5\n\t"