gallium: Only define PIPE_ALIGNSTACK on x86.
authorEric Anholt <eric@anholt.net>
Tue, 17 Dec 2019 05:03:32 +0000 (21:03 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 18 Feb 2020 23:40:04 +0000 (15:40 -0800)
At least arm and arm64 don't respect this attribute, producing compiler
warnings in lp_test_format.c.  The gcc and LLVM docs for the attribute
only talk about them being needed on x86.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>

src/gallium/include/pipe/p_compiler.h

index 2869517389f9fd851a2059ded231c5878dbcc55a..8c3a793e336281657bf0df627b521c2b6753b236 100644 (file)
@@ -128,7 +128,7 @@ typedef unsigned char boolean;
 /* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Variable-Attributes.html */
 #define PIPE_ALIGN_VAR(_alignment) __attribute__((aligned(_alignment)))
 
-#if defined(__GNUC__) && !defined(PIPE_ARCH_X86_64)
+#if defined(__GNUC__) && defined(PIPE_ARCH_X86)
 #define PIPE_ALIGN_STACK __attribute__((force_align_arg_pointer))
 #else
 #define PIPE_ALIGN_STACK