From 68edb4eac55457796ed5c5e4f1c702af749fd543 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 14 Oct 2009 17:11:08 +0100 Subject: [PATCH] gallium: New ALIGN_STACK macro to tell gcc to align stack pointer. --- src/gallium/include/pipe/p_compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index c13cffceb0a..c36286f9bee 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -167,11 +167,17 @@ typedef unsigned char boolean; #define ALIGN16_ASSIGN(NAME) NAME##___aligned #define ALIGN16_ATTRIB __attribute__(( aligned( 16 ) )) #define ALIGN8_ATTRIB __attribute__(( aligned( 8 ) )) +#if __GNUC__ > 4 || (__GNUC__ == 4 &&__GNUC_MINOR__>1) +#define ALIGN_STACK __attribute__((force_align_arg_pointer)) +#else +#define ALIGN_STACK +#endif #else #define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME##___unaligned[SIZE + 1] #define ALIGN16_ASSIGN(NAME) align16(NAME##___unaligned) #define ALIGN16_ATTRIB #define ALIGN8_ATTRIB +#define ALIGN_STACK #endif -- 2.30.2