mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
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 190bae7685)
This commit is contained in:
parent
49e093a2f5
commit
3e616f77bd
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue