Mesa (master): amd/addrlib: fix build on non-x86 platforms
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 26 20:33:20 UTC 2020
Module: Mesa
Branch: master
Commit: 56f31328f207f310ee9b53f3294a23b25b2687e0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=56f31328f207f310ee9b53f3294a23b25b2687e0
Author: Greg V <greg at unrelenting.technology>
Date: Sun Jan 26 14:22:45 2020 +0300
amd/addrlib: fix build on non-x86 platforms
regparm(0) attribute does not work on aarch64 (and presumably powerpc64 and others).
Default to not specifying any calling convention on non-amd64/i386 platforms.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3567>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3567>
---
src/amd/addrlib/inc/addrtypes.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/amd/addrlib/inc/addrtypes.h b/src/amd/addrlib/inc/addrtypes.h
index 7d8ca926678..c17e817e3aa 100644
--- a/src/amd/addrlib/inc/addrtypes.h
+++ b/src/amd/addrlib/inc/addrtypes.h
@@ -87,9 +87,7 @@ typedef int INT;
#endif
#ifndef ADDR_FASTCALL
- #if defined(BRAHMA_ARM)
- #define ADDR_FASTCALL
- #elif defined(__GNUC__)
+ #if defined(__GNUC__)
#define ADDR_FASTCALL __attribute__((regparm(0)))
#else
#define ADDR_FASTCALL __fastcall
@@ -115,7 +113,11 @@ typedef int INT;
#define ADDR_INLINE __inline
#endif // #if defined(__GNUC__)
-#define ADDR_API ADDR_FASTCALL //default call convention is fast call
+#if defined(__amd64__) || defined(__x86_64__) || defined(__i386__)
+ #define ADDR_API ADDR_FASTCALL // default call convention is fast call
+#else
+ #define ADDR_API
+#endif
/**
****************************************************************************************************
More information about the mesa-commit
mailing list