I try to use the mmx to implement the sse2 intrinsics functions because my code has a heavy call to them while I must make it run on old cpu.
typedef __declspec(align(16)) struct {
__m64 v64[2];
} ___m128i;
#define __m128i ___m128i
__inline __m128i
dcm_add_epi8(__m128i a, __m128i b)
{
__m128i x;
x.v64[0] = _mm_add_pi8(a.v64[0], b.v64[0]);
x.v64[1] = _mm_add_pi8(a.v64[1], b.v64[1]);
return x;
}
but when I compile the code, the vc2008 compiler reports:
error C2719: 'a': formal parameter with __declspec(align('16')) won't be aligned
error C2719: 'b': formal parameter with __declspec(align('16')) won't be aligned