mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 02:00:22 +01:00
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@amd.com>
(cherry picked from commit 56f31328f2)
Signed-off-by: John Stultz <john.stultz@linaro.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4239>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4239>
This commit is contained in:
parent
3cabdc38fd
commit
2af8aeb9a6
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue