Sign in to follow this  

Pass+return by register in SSE?

Recommended Posts

Anyone know a trick to do this? For example: __declspec(noinline) inline __m128 MyAdd( __m128 a, __m128 b ) { return _mm_add_ps( a, b ); } will pass and return in vector registers. But trying to do the same thing with a wrapped class does not work: class MyVector { public: // ... __m128 v; }; Sometimes SIMD units have ways to flag a class or struct as being "passable/returnable by register". Anyone know of such a trick for SSE? Thanks.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this