|
Posted by mike on June 6, 2007, 1:04 pm
Please log in for more thread options >
>
>
>
>
> > mike wrote:
> > > <http://msdn2.microsoft.com/en-us/library/ms254258(VS.80).aspx>
> > > I found this on msdn; does this not work with VS2005 today?
>
> > > Thanks,
>
> > hmm interesting, I don't have the contact details for anyone on the VSD
> > team. Nor do I have a WM5 xscale device handy - but I do know this fails
> > with an invalid instruction exception on the emulator:
> > #include <windows.h>
> > #include <mmintrin.h>
> > #include <cmnintrin.h>
>
> > int WINAPI WinMain(HINSTANCE hInstance,
> > HINSTANCE hPrevInstance,
> > LPTSTR lpCmdLine,
> > int nCmdShow)
> > {
> > __m64 a = , b = ;
> > a.m64_u32[1] = 1;
> > b.m64_u32[1] = 2;
>
> > __m64 ret = _mm_adds_pi32(a, b);
>
> > return ret.m64_u32[0];
>
> > }
>
> > Riki
>
> > --
> > ThemeChanger and AbstractStart for Smartphone
:http://www.IfIHadADollarForEveryTimeSomeoneSaidThatIWouldHaveMyOwnWeb...
>
> > Small minds discuss people,Average minds discuss events,Great minds
> > discuss ideas.
>
> Thanks for the help! You're much further than I am on this. I can't
> even get the code you have here to compile. I copied it (except for
> the return) into an existing project and receive the following...
>
> Error 14 error C2275: '__m64' : illegal use of this type as an
> expression
> Error 15 error C2146: syntax error : missing ';' before identifier
> 'ret'
> Error 16 error C2065: 'ret' : undeclared identifier
> Error 17 error C2440: '=' : cannot convert from '__m64' to 'int'
>
> I've included _CMMN_INTRIN_FUNC in the preprocessor entries but no
> luck.
>
> Mike- Hide quoted text -
>
> - Show quoted text -
Some follow-up info...
I can get the below code to compile now and run on the mobile 6
emulator. However, if I uncomment the line __m64 ret =
_mm_adds_pi32( a, b ); below, I get the compile error that follows
it.
void _m_empty(void);
__m64 a = ;
__m64 b = ;
a.m64_u32[1] = 1;
b.m64_u32[1] = 2;
printf( "a.m64_u32: %d \n", a.m64_u32[ 1 ] );
// __m64 ret = _mm_adds_pi32( a, b );
Error 14 error C2275: '__m64' : illegal use of this type as an
expression
Error 15 error C2146: syntax error : missing ';' before identifier
'ret'
Error 16 error C2065: 'ret' : undeclared identifier
Error 17 error C2440: '=' : cannot convert from '__m64' to 'int'
Thanks,
Mike
|