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


On Mon, 2002-03-18 at 19:16, DJ Delorie wrote:
> Did you use inline asm to put the counter in %eax?  Wherever you got
> the count value from, tell gcc about that, and it should figure out to
> use %eax anyway.

It's something like this:

%edx = n
%eax = %edx
%eax >> 22

It's completely modified in assembler.

> 
> Have you tried using &filt_cos instead of just filt_cos?  You'd need
> an "i" constraint.

Like this: "pmaddwd  (%0, %%eax, 8), %%mm3" : : "i" (&cosin64)?
Results in: pmaddwd  ($cosin64, %eax, 8), %mm3
/tmp/ccNuWzdA.s:1827: Error: missing ')'
/tmp/ccNuWzdA.s:1827: Error: junk `,%eax,8)' after expression

> 
> At some point, it becomes worthwhile to switch to plain old assembler
> (*.S) instead of inline assembler.  The whole advantage of inline
> assembler is to let gcc keep track of where everything is.

Hmm.


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