How do you do inline assembly with vector types in GCC?
From: michael (michael.moy.1995_at_alum.bu.edu)
Date: 05/18/04
- Next message: Ivan Korotkov: "Re: Emulating FPU"
- Previous message: Woody: "Re: DirectX in HLA"
- Next in thread: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Maybe reply: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: Matt Taylor: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: Grumble: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: michael: "Re: How do you do inline assembly with vector types in GCC?"
- Maybe reply: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 May 2004 20:13:26 +0000 (UTC)
I'm trying to port some MSVC++ SSE2 inline assembler to GCC and am playing
with a code fragment to see if I can move stuff in and out of vectors as
follows:
#include <stdio.h>
int main() {
char sse2_array[16] __attribute__((aligned(16)));
unsigned long p;
p = 10;
printf("%d \n", p);
sse2_array[0] = 1;
sse2_array[2] = 2;
printf("%d %d\n", sse2_array[0], sse2_array[1]);
asm("pxor %xmm0, %xmm0");
asm("movdqa %xmm0, %0;"
:"=r"(sse2_array));
printf("%d \n", p);
return 0;
}
I get the following message when I try to do this:
gcc mike.c
mike.c: In function `main':
mike.c:12: incompatible types in assignment
Anyone have an easy way to do this?
- Next message: Ivan Korotkov: "Re: Emulating FPU"
- Previous message: Woody: "Re: DirectX in HLA"
- Next in thread: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Maybe reply: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: Matt Taylor: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: Grumble: "Re: How do you do inline assembly with vector types in GCC?"
- Reply: michael: "Re: How do you do inline assembly with vector types in GCC?"
- Maybe reply: Stephen Sprunk: "Re: How do you do inline assembly with vector types in GCC?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|