[Mesa-dev] [PATCH] amd/addrlib: limit fastcall/regparm to i386

Jason Ekstrand jason at jlekstrand.net
Sat Oct 22 06:08:45 UTC 2016


On Fri, Oct 21, 2016 at 10:58 PM, Dave Airlie <airlied at gmail.com> wrote:

> On 22 Oct. 2016 15:51, "Jason Ekstrand" <jason at jlekstrand.net> wrote:
> >
> > Wait... Why are we building the AMD driver on ARM?  I know AMD has been
> talking about ARM-based servers, but are they actually strapping GPUs to
> them?
>
> PCIE on ARM somewhere.
>
I suppose so.  I don't usually think of ARM devices as having PCIE, but I
guess it's possible...  You learn something every day.


> Dave.
>
> >
> > On Fri, Oct 21, 2016 at 1:16 AM, Nicolai Hähnle <nhaehnle at gmail.com>
> wrote:
> >>
> >> On 21.10.2016 00:20, Rob Herring wrote:
> >>>
> >>> 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.
> >>
> >>
> >> While we haven't been particularly good at syncing things
> back-and-forth, this code is shared with closed source driver builds,
> including on Windows.
> >>
> >> Please re-structure the patch so that it really only changes the
> behavior with Clang. (For example, that MSVC doesn't define __i386__ as far
> as I'm aware.)
> >>
> >> Thanks,
> >> Nicolai
> >>
> >>>
> >>> Signed-off-by: Rob Herring <robh at kernel.org>
> >>> ---
> >>>  src/amd/addrlib/addrtypes.h | 10 +++++++---
> >>>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/src/amd/addrlib/addrtypes.h b/src/amd/addrlib/addrtypes.h
> >>> index 4c68ac544b88..183b5a751c3a 100644
> >>> --- a/src/amd/addrlib/addrtypes.h
> >>> +++ b/src/amd/addrlib/addrtypes.h
> >>> @@ -87,10 +87,14 @@ typedef int            INT;
> >>>  #endif
> >>>
> >>>  #ifndef ADDR_FASTCALL
> >>> -    #if defined(__GNUC__)
> >>> -        #define ADDR_FASTCALL __attribute__((regparm(0)))
> >>> +    #if defined(__i386__)
> >>> +       #if defined(__GNUC__)
> >>> +            #define ADDR_FASTCALL __attribute__((regparm(0)))
> >>> +        #else
> >>> +            #define ADDR_FASTCALL __fastcall
> >>> +        #endif
> >>>      #else
> >>> -        #define ADDR_FASTCALL __fastcall
> >>> +       #define ADDR_FASTCALL
> >>>      #endif
> >>>  #endif
> >>>
> >>>
> >> _______________________________________________
> >> mesa-dev mailing list
> >> mesa-dev at lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> >
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161021/c8cf1aea/attachment.html>


More information about the mesa-dev mailing list