Open
Description
#include "xmmintrin.h"
class Foo {
public:
__declspec(noinline) __m128 bar() {
return __m128{};
}
};
clang-cl
returns in xmm0
, msvc takes a second hidden parameter to write to, so when the caller and callee come from objects created by different compilers any integer parameters are offset and the return value is incorrect.
The visual studio documentation (https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2019#return-values) seem to imply that clang's behaviour is correct, unless __m128 etc are considered user defined types.