mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
amd/addrlib: prevent defining regparm differently
Define it in meson, so addrlib won't define it. This is adding back the addrlib original code. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9668>
This commit is contained in:
parent
59912cd4cf
commit
1d69c0419b
2 changed files with 8 additions and 4 deletions
|
|
@ -87,9 +87,12 @@ typedef int INT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ADDR_FASTCALL
|
#ifndef ADDR_FASTCALL
|
||||||
#if defined(__GNUC__) || defined(BRAHMA_ARM)
|
#if defined(__GNUC__)
|
||||||
// We don't care about the performance of call instructions in addrlib
|
#if defined(__i386__) || defined(__amd64__) || defined(__x86_64__)
|
||||||
#define ADDR_FASTCALL
|
#define ADDR_FASTCALL __attribute__((regparm(0)))
|
||||||
|
#else
|
||||||
|
#define ADDR_FASTCALL
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define ADDR_FASTCALL __fastcall
|
#define ADDR_FASTCALL __fastcall
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,8 @@ files_addrlib = files(
|
||||||
'src/r800/siaddrlib.h',
|
'src/r800/siaddrlib.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
cpp_args_addrlib = []
|
# Skip the addrlib definition of ADDR_FASTCALL so as not to use regparm.
|
||||||
|
cpp_args_addrlib = ['-DADDR_FASTCALL=']
|
||||||
foreach w : ['-Wno-unused-variable', '-Wno-unused-local-typedefs',
|
foreach w : ['-Wno-unused-variable', '-Wno-unused-local-typedefs',
|
||||||
'-Wno-unused-but-set-variable', '-Wno-maybe-uninitialized']
|
'-Wno-unused-but-set-variable', '-Wno-maybe-uninitialized']
|
||||||
if cpp.has_argument(w)
|
if cpp.has_argument(w)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue