[PATCH 1/1] xfree86: Use the correct __i386__ inline asm fallbacks in compiler.h

Jeremy Huddleston Sequoia jeremyhu at apple.com
Tue Oct 20 11:02:12 PDT 2015


Note that I'm not 100% confident that this is correct.  It looks right to me, but I'm certainly no expert here.  That file is chuck full of cpp-goop that makes my head spin.

The reason we hadn't seen this until recently is that we were using -DFAKEIT for builds on darwin because we didn't care about that code anyways (we just use fake, null, nested drivers).  That was removed in 80446086b9cfcc5e23a400d7fa38ec773fae68fc, and we are just now jumping to 1.17.x for the next XQuartz release.  Note that tinderbox would've caught this if it were still alive =(

--Jeremy


> On Oct 20, 2015, at 10:52, Jeremy Huddleston Sequoia <jeremyhu at apple.com> wrote:
> 
> ../../../../hw/xfree86/common/compiler.h:975:26: error: invalid operand in inline asm: 'out${0:B} ($1)' [Inline Assembly Issue]
>    __asm__ __volatile__("out%B0 (%1)"::"a"(val), "d"(port));
>                         ^
> ../../../../hw/xfree86/common/compiler.h:975:26: error: unknown use of instruction mnemonic without a size suffix [Inline Assembly Issue]
> <inline asm>:1:2: note: instantiated into assembly here
>        out (%dx)
>        ^
> 2 errors generated.
> 
> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
> CC: Adam Jackson <ajax at nwnk.net>
> ---
> hw/xfree86/common/compiler.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
> index 1653574..1f48f69 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(__i386__) || defined(__amd64__)
> 
> #include <inttypes.h>
> 
> @@ -967,7 +967,7 @@ inl(unsigned PORT_SIZE port)
> 
> #endif                          /* NDS32_MMIO_SWAP */
> 
> -#elif defined(__i386__) || defined(__ia64__)
> +#elif defined(__ia64__)
> 
> static __inline__ void
> outb(unsigned short port, unsigned char val)
> -- 
> 2.6.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list