I'm using MSVC to use some SSE intrinsics. In order to support this I aligned some of my data at a 16byte boundary. However, now that I compile for x86 instead of x64, MSVC insists that it is illegal for me to align a function parameter to 16bytes. But if that's true then how can anyone ever send SSE data types as function parameters?
So how can I send 16byte aligned parameters in a function?
if that's true then how can anyone ever send SSE data types as function parameters?
You can't. :) Under Microsoft's ABI, you have to pass it by reference or pointer.
One workaround may be to use the fastcall calling convention which, apparently, passes the first few SSE arguments in XMM registers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With