Common: Add proper macros to test for architecture pointer size
The old system of just defining macros available in some other platform
was susceptible to silently using the wrong code if you forgot to
include a particular header. This fixes a crash on non-Windows platforms
introduced by e1fbac3ca1
.
This commit is contained in:
parent
4f4d230dac
commit
fae5933ad6
5 changed files with 11 additions and 17 deletions
|
@ -34,13 +34,6 @@
|
|||
#define MEMORY_ALIGNED64(x) __declspec(align(64)) x
|
||||
#define MEMORY_ALIGNED128(x) __declspec(align(128)) x
|
||||
#else
|
||||
// Windows compatibility
|
||||
#ifdef _LP64
|
||||
#define _M_X64 1
|
||||
#else
|
||||
#define _M_IX86 1
|
||||
#endif
|
||||
|
||||
#define __forceinline inline __attribute__((always_inline))
|
||||
#define MEMORY_ALIGNED16(x) __attribute__((aligned(16))) x
|
||||
#define MEMORY_ALIGNED32(x) __attribute__((aligned(32))) x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue