This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inline asm problem


TWISTI <twisti@fusion.at> writes:

> On Mon, 2002-03-18 at 18:46, DJ Delorie wrote:
> > Why not this?
> >     asm("mov  %0, %%mm1" : : "m" (filt_cos[n]));
> > 
> > You don't have to be *that* clever, as gcc *does* know how to handle
> > things like this on its own.
> > 
> 
> Would be possible, but counter is in %eax and i need fastest execution
> possible. Assignment to `n' isn't that clever i think.

You need to read up about gcc constraints, which is a subject for the
gcc list, not for here.  You can use constraints to force gcc to put a
value into a particular set of registers, which I think is what you
want.  See
    http://gcc.gnu.org/onlinedocs/gcc-3.0.3/gcc_20.html#SEC216
with particular attention to the i386 section in
    http://gcc.gnu.org/onlinedocs/gcc-3.0.3/gcc_20.html#SEC221

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]