This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Using the Intel's MMX Instruction Set in gcc3.2
- From: Ulrich Prakash <uprakash at npd dot hcltech dot com>
- To: "Andrea 'fwyzard' Bocci" <fwyzard-gcc at libero dot it>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 05 Mar 2003 20:18:03 +0530
- Subject: Re: Using the Intel's MMX Instruction Set in gcc3.2
- References: <5.1.0.14.0.20030305162214.03a1baf0@pilex>
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.