[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH] xfree86: Use same inb/outb asm code for i386 amd64 and ia64
From:       Jeremy Huddleston Sequoia <jeremyhu () freedesktop ! org>
Date:       2015-10-22 5:29:38
Message-ID: 4084EFA1-2DE1-416B-BF9E-78941135FE32 () freedesktop ! org
[Download RAW message or body]

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

> On Oct 21, 2015, at 09:24, Adam Jackson <ajax@redhat.com> wrote:
> 
> This matches the GCCUSESGAS path from the old monolith build (where that
> macro was actually set), and fixes the build on modern OSX.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
> hw/xfree86/common/compiler.h | 49 +-------------------------------------------
> 1 file changed, 1 insertion(+), 48 deletions(-)
> 
> diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
> index 85fb35c..5a1fdac 100644
> --- a/hw/xfree86/common/compiler.h
> +++ b/hw/xfree86/common/compiler.h
> @@ -286,7 +286,7 @@ extern _X_EXPORT unsigned int inl(unsigned int port);
> #include <machine/pio.h>
> #endif                          /* __NetBSD__ */
> 
> -#elif defined(__amd64__)
> +#elif defined(__amd64__) || defined(__i386__) || defined(__ia64__)
> 
> #include <inttypes.h>
> 
> @@ -967,53 +967,6 @@ inl(unsigned PORT_SIZE port)
> 
> #endif                          /* NDS32_MMIO_SWAP */
> 
> -#elif defined(__i386__) || defined(__ia64__)
> -
> -static __inline__ void
> -outb(unsigned short port, unsigned char val)
> -{
> -    __asm__ __volatile__("out%B0 (%1)"::"a"(val), "d"(port));
> -}
> -
> -static __inline__ void
> -outw(unsigned short port, unsigned short val)
> -{
> -    __asm__ __volatile__("out%W0 (%1)"::"a"(val), "d"(port));
> -}
> -
> -static __inline__ void
> -outl(unsigned short port, unsigned int val)
> -{
> -    __asm__ __volatile__("out%L0 (%1)"::"a"(val), "d"(port));
> -}
> -
> -static __inline__ unsigned int
> -inb(unsigned short port)
> -{
> -    unsigned char ret;
> -    __asm__ __volatile__("in%B0 (%1)":"=a"(ret):"d"(port));
> -
> -    return ret;
> -}
> -
> -static __inline__ unsigned int
> -inw(unsigned short port)
> -{
> -    unsigned short ret;
> -    __asm__ __volatile__("in%W0 (%1)":"=a"(ret):"d"(port));
> -
> -    return ret;
> -}
> -
> -static __inline__ unsigned int
> -inl(unsigned short port)
> -{
> -    unsigned int ret;
> -    __asm__ __volatile__("in%L0 (%1)":"=a"(ret):"d"(port));
> -
> -    return ret;
> -}
> -
> #endif                          /* arch madness */
> 
> #else                           /* !GNUC */
> -- 
> 2.5.0
> 
> _______________________________________________
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic