- Dec 11, 1999
- 16,577
- 4,492
- 75
The thread on SIMD and MMX programming got me wanting to try MMX, SSE2, and intrinsics. So far I'm only working with MMX (on a processor that doesn't support SSE2), and I have two compiler errors I can't get rid of.
The idea is to have a C string, and load parts of it into MMX registers. First of all, I assume that MMX can't read misaligned quadwords (or can't read them efficiently). But when I do:
I consistently get:
That almost exactly matches some code I found online, so I'm stumped.
After that, I need to read an aligned chunk of 8 bytes at once. The only example code I have is for SSE2, which uses the _mm_load_si128 instruction. But there is no _mm_load_si64 instruction that I can find, and everything else I try reports:
Any ideas?
Thanks!
The idea is to have a C string, and load parts of it into MMX registers. First of all, I assume that MMX can't read misaligned quadwords (or can't read them efficiently). But when I do:
static __declspec(align(8)) // Align arrays by 8
unsigned char buf[96];
I consistently get:
warning: `align' attribute directive ignored
That almost exactly matches some code I found online, so I'm stumped.
After that, I need to read an aligned chunk of 8 bytes at once. The only example code I have is for SSE2, which uses the _mm_load_si128 instruction. But there is no _mm_load_si64 instruction that I can find, and everything else I try reports:
error: can't convert value to a vector
error: can't convert between vector values of different size
Any ideas?
Thanks!