This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Using the Intel's MMX Instruction Set in gcc3.2


Hi,

I tried this piece of code.

-----testmac.c-----------
#include <mmintrin.h>

int main()
{
   __m64 m1 = 12;
   __m64 m2 = 24;
 __m64 m3;

asm ("pmaddwd m1,m2\n\t");

m3 = m1;

   return;
}

and tried compiling using> gcc -mmmx testmac.c
I get the foll ERROR:
/tmp/cc0rnlnq.s: Assembler messages:
/tmp/cc0rnlnq.s:18: Error: too many memory references for `pmaddwd'

though i could find nothing wrong in usage of asm ("pmaddwd m1,m2\n\t");

Please help me if I am missing something.

Thanks,
Prakash.

At 02:06 PM 3/5/03 +0100, Andrea 'fwyzard' Bocci wrote:
At 16.32 05/03/2003 +0530, Ulrich Prakash wrote:
Hi,

I am using gcc version3.2,which supports the MMX Instruction Set.
Can anyone tell me how to use this Instruction Set in my C program?

Is there a particular way that GCC provides to use the MMX Instruction Set directly?(If so,how?)
(OR)
Is it through an assembly function(.s file) in which I would have to use these Instruction Sets,and which I would have to call in my C program?

I don't recall now, I think there should be some intrinsics for that, or whatever. Have a look into the GCC manual, looking for MMX.


.fwyzard.


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