From 190bae7685e230d8fb4e9a0f9ce4a6aa3c7643f5 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 2 Nov 2016 15:32:22 +0000 Subject: [PATCH] amd/addrlib: limit fastcall/regparm to GCC i386 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Cc: Rob Herring Cc: Nicolai Hähnle Signed-off-by: Emil Velikov Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák Reviewed-by: Rob Herring --- 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 4c68ac544b8..4dd7babf004 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.30.2