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] | |
simd_mmintrin(n, is)
I *is;
{ __v2si q,r;
I i;
_m_empty();
q=_m_from_int(0);
for (i=0; i < n; i+=W) {
memcpy(&r,is+i,IZ*W);
q=_m_paddd(q,r);
}
I*qq=(I*)&q;
return qq[0]+qq[1];
}
Don't extract the values by taking the address of q. Instead do
something like this:
union { long ai[2]; __m64 m } u;
u.m = q;
return u.ai[0] + u.ai[1];| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |