svga: Use __asm__ instead of asm
authorDylan Baker <dylan@pnwbakers.com>
Thu, 26 Oct 2017 22:32:09 +0000 (15:32 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 1 Nov 2017 22:05:26 +0000 (15:05 -0700)
__asm__ is portable, and allows the svga driver to be compiled with the
c99 standard instead of requiring the gnu99 standard.

I have compile tested this with GCC and Clang on Linux.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/Makefile.am
src/gallium/drivers/svga/svga_msg.c
src/gallium/winsys/svga/drm/Makefile.am

index 1ad5e0f91e6e3f2cd505a46c62dabfe477b7bcc8..2e5220e9f271c76c3a18031fcf48dd6b0b6baa3c 100644 (file)
@@ -30,9 +30,6 @@ AM_CFLAGS = \
        $(GALLIUM_DRIVER_CFLAGS) \
        $(MSVC2013_COMPAT_CFLAGS)
 
-#On some systems -std= must be added to CFLAGS to be the last -std=
-CFLAGS += -std=gnu99
-
 noinst_HEADERS = $(SVGA_H_FILES)
 noinst_LTLIBRARIES = libsvga.la
 
index e0346dee751140e9ba4ac80eee64714f446825ea..8b63132cb575bb45bfad61722559566903bf82e1 100755 (executable)
@@ -83,7 +83,7 @@
          port_num, magic,                  \
          ax, bx, cx, dx, si, di)           \
 ({                                         \
-   asm volatile ("inl %%dx, %%eax;" :      \
+   __asm__ volatile ("inl %%dx, %%eax;" :  \
       "=a"(ax),                            \
       "=b"(bx),                            \
       "=c"(cx),                            \
@@ -128,7 +128,7 @@ typedef uint64_t VMW_REG;
          port_num, magic, bp,                     \
          ax, bx, cx, dx, si, di)                  \
 ({                                                \
-   asm volatile ("push %%rbp;"                    \
+   __asm__ volatile ("push %%rbp;"                \
       "movq %12, %%rbp;"                          \
       "rep outsb;"                                \
       "pop %%rbp;" :                              \
@@ -152,7 +152,7 @@ typedef uint64_t VMW_REG;
          port_num, magic, bp,                     \
          ax, bx, cx, dx, si, di)                  \
 ({                                                \
-   asm volatile ("push %%rbp;"                    \
+   __asm__ volatile ("push %%rbp;"                \
       "movq %12, %%rbp;"                          \
       "rep insb;"                                 \
       "pop %%rbp" :                               \
@@ -183,7 +183,7 @@ typedef uint32_t VMW_REG;
          port_num, magic, bp,                     \
          ax, bx, cx, dx, si, di)                  \
 ({                                                \
-   asm volatile ("push %%ebp;"                    \
+   __asm__ volatile ("push %%ebp;"                \
       "mov %12, %%ebp;"                           \
       "rep outsb;"                                \
       "pop %%ebp;" :                              \
@@ -208,7 +208,7 @@ typedef uint32_t VMW_REG;
          port_num, magic, bp,                     \
          ax, bx, cx, dx, si, di)                  \
 ({                                                \
-   asm volatile ("push %%ebp;"                    \
+   __asm__ volatile ("push %%ebp;"                \
       "mov %12, %%ebp;"                           \
       "rep insb;"                                 \
       "pop %%ebp" :                               \
index dfa97367650f3bcecb3a83f8583faec689dc6716..ac9de18d3df01348c42bc56448de5e40062c3fb7 100644 (file)
@@ -29,9 +29,6 @@ AM_CFLAGS = \
        $(GALLIUM_WINSYS_CFLAGS) \
        $(LIBDRM_CFLAGS)
 
-#On some systems -std= must be added to CFLAGS to be the last -std=
-CFLAGS += -std=gnu99
-
 noinst_LTLIBRARIES = libsvgadrm.la
 
 libsvgadrm_la_SOURCES = $(C_SOURCES)