I have a project which links against the bullet physics library, and while it worked perfectly under XCode 10.3, the build suddenly fails with zero changes to the project after updating to XCode 11.
The project in question is a C++ library project, generated using swift package manager (`swift package generate-xcodeproj`). It's built using clang, with C++ dialect C++17.
The error is being thrown from this file: https://github.com/bulletphysics/bullet3/blob/master/src/LinearMath/btVector3.h on line 335:
y = bt_splat_ps(y, 0x80);
The error is this: "Argument value 10880 is outside the valid range [0, 255]"
Here bt_splat_ps is a macro defined like so:
#define _mm_shuffle_ps(a, b, mask) \
(__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
(int)(mask))
#define BT_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x))
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
#define bt_splat_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, _i))
...
y = bt_splat_ps(y, 0x80);
So it looks like maybe this error is coming from the argument which is provided to `__builtin_ia32_shufps`?
Is there anything which has changed in the XCode 11 tools which would explain why this was previously working and no longer works?