Visual Studio parameter alignment restrictions and Windows x64 ABI Visual Studio parameter alignment restrictions and Windows x64 ABI windows windows

Visual Studio parameter alignment restrictions and Windows x64 ABI


You can pass as many 128 bit SSE intrinsic parameters as you like under x64. The x64 ABI was designed with these types in mind.

From the MSDN documentation:

__m128 types, arrays and strings are never passed by immediate value but rather a pointer is passed to memory allocated by the caller. Structs/unions of size 8, 16, 32, or 64 bits and __m64 are passed as if they were integers of the same size. Structs/unions other than these sizes are passed as a pointer to memory allocated by the caller. For these aggregate types passed as a pointer (including __m128), the caller-allocated temporary memory will be 16-byte aligned.