This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: inline asm problem
- From: Ian Lance Taylor <ian at airs dot com>
- To: TWISTI <twisti at fusion dot at>
- Cc: binutils at sources dot redhat dot com
- Date: 18 Mar 2002 01:30:40 -0800
- Subject: Re: inline asm problem
- References: <1016441942.28575.1.camel@sector17.home.at>
TWISTI <twisti@fusion.at> writes:
> I've already posted this in `gcc@gcc.gnu.org'. But maybe this is the
> _more_ correct list. Here it goes:
>
> Can anyone tell me how the at&t syntax is for this small intel asm?
>
> short filt_cos[] = { 141, ... };
>
> pmaddwd mm1, [filt_cos + 8]
>
> I've tried it this way:
>
> __asm__ __volatile__ ("pmaddwd 8(%0), %%mm1" : : "m" (filt_cos));
>
> but:
> /tmp/cctukwBb.s: Assembler messages:
> /tmp/cctukwBb.s:1753: Error: junk `(.LC13)' after expression
>
> Then i tried this:
>
> __asm__ __volatile__ ("pmaddwd 8 + %0(,1), %%mm1" : : "m" (filt_cos));
>
> works, but give wrong result.
>
> Is there an _one_liner_ solution?
It looks to me like you are trying to add 8 within the inline
assembler. But you've told gcc to use an arbitrary memory address.
There is no reason to expect that gcc will expect you something to
which you can add 8. You could try using a constraint of "o". But
why not just do this:
__asm__ __volatile__ ("pmaddwd %0, %%mm1" : : "m" (filt_cos + 8));
Ian