summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-11-02 15:32:22 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-11-10 22:07:04 +0000
commit3e616f77bd284360dc793c0d5c5affd76ed28003 (patch)
tree344b3523d77d26042f175958758d91e9d391219c /src
parent49e093a2f58650374c2efe9cc6a5ab03cf52a48c (diff)
downloadexternal_mesa3d-3e616f77bd284360dc793c0d5c5affd76ed28003.zip
external_mesa3d-3e616f77bd284360dc793c0d5c5affd76ed28003.tar.gz
external_mesa3d-3e616f77bd284360dc793c0d5c5affd76ed28003.tar.bz2
amd/addrlib: limit fastcall/regparm to GCC i386
The use of regparm causes an error on arm/arm64 builds with clang. fastcall is allowed, but still throws a warning. As both options only have effect on 32-bit x86 builds, limit them to that case. v2: keep the __i386__ within GCC (Nicolai) Cc: 13.0 <mesa-stable@lists.freedesktop.org> Cc: Rob Herring <robh@kernel.org> Cc: Nicolai Hähnle <nhaehnle@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Rob Herring <robh@kernel.org> (cherry picked from commit 190bae7685e230d8fb4e9a0f9ce4a6aa3c7643f5)
Diffstat (limited to 'src')
-rw-r--r--src/amd/addrlib/addrtypes.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/addrlib/addrtypes.h b/src/amd/addrlib/addrtypes.h
index 4c68ac5..4dd7bab 100644
--- a/src/amd/addrlib/addrtypes.h
+++ b/src/amd/addrlib/addrtypes.h
@@ -88,7 +88,11 @@ typedef int INT;
#ifndef ADDR_FASTCALL
#if defined(__GNUC__)
- #define ADDR_FASTCALL __attribute__((regparm(0)))
+ #if defined(__i386__)
+ #define ADDR_FASTCALL __attribute__((regparm(0)))
+ #else
+ #define ADDR_FASTCALL
+ #endif
#else
#define ADDR_FASTCALL __fastcall
#endif