diff options
Diffstat (limited to 'common/threads.h')
-rw-r--r-- | common/threads.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/threads.h b/common/threads.h index c2848ee7..87b8a6f5 100644 --- a/common/threads.h +++ b/common/threads.h @@ -3,6 +3,16 @@ #include <time.h> +#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 + #ifdef __cplusplus extern "C" { #endif |