diff options
author | Chris Robinson <[email protected]> | 2013-11-25 17:29:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-11-25 17:29:39 -0800 |
commit | 80ea801204cec06b26ac8823747ad0981165822c (patch) | |
tree | 4ba696fe3fb56d042d779a994051112380e2229e /OpenAL32/Include/alMain.h | |
parent | 191e8172f0ed00f423f7806b3b52b95d1dab53cc (diff) |
Add a macro for GCC to ensure stack alignment
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index cc631935..e0753ea8 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -74,6 +74,16 @@ typedef ptrdiff_t ALsizeiptrEXT; #define PRINTF_STYLE(x, y) #endif +#if defined(__GNUC__) && defined(__i386__) +/* force_align_arg_pointer is required for proper function arguments aligning + * when SSE code is used. Some systems (Windows, QNX) do not guarantee our + * thread functions will be properly aligned on the stack, even though GCC may + * generate code with the assumption that it is. */ +#define FORCE_ALIGN __attribute__((force_align_arg_pointer)) +#else +#define FORCE_ALIGN +#endif + static const union { ALuint u; |