[Mesa-stable] [Mesa-dev] [PATCH] amd/addrlib: limit fastcall/regparm to GCC i386
Marek Olšák
maraeo at gmail.com
Wed Nov 2 21:14:40 UTC 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Nov 2, 2016 at 4:32 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> 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 at lists.freedesktop.org>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Nicolai Hähnle <nhaehnle at gmail.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> I'm having doubts whether the whole "let's change calling conventions"
> thing is worth the effort, but considering the "let's ignore standard
> primitives/types and use the Windows ones" et al. it's pretty much
> nothing ;-)
>
> </rant>
> ---
> src/amd/addrlib/addrtypes.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> 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
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list