gallium: add PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS
[mesa.git] / src / gallium / drivers / svga / svga_msg.c
index 3bbe89f5f6b96dd5d6926d50f12dfa04c6046d13..8b63132cb575bb45bfad61722559566903bf82e1 100755 (executable)
@@ -57,7 +57,7 @@
 #define HIGH_WORD(X) ((X & 0xFFFF0000) >> 16)
 
 
-#if defined(PIPE_CC_GCC)
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 502)
 
 /**
  * Hypervisor-specific bi-directional communication channel.  Should never
@@ -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" :                               \
@@ -241,15 +241,25 @@ typedef uint32_t VMW_REG;
 
 #define VMW_PORT(cmd, in_bx, in_si, in_di, \
          port_num, magic,                  \
-         ax, bx, cx, dx, si, di)
+         ax, bx, cx, dx, si, di)           \
+         (void) in_bx;                     \
+         (void) ax; (void) bx; (void) cx;  \
+         (void) dx; (void) si; (void) di;
 
 #define VMW_PORT_HB_OUT(cmd, in_cx, in_si, in_di, \
          port_num, magic, bp,                     \
-         ax, bx, cx, dx, si, di)
+         ax, bx, cx, dx, si, di)                  \
+         (void) in_cx; (void) bp;                 \
+         (void) ax; (void) bx; (void) cx;         \
+         (void) dx; (void) si; (void) di;
+                       
 
 #define VMW_PORT_HB_IN(cmd, in_cx, in_si, in_di,  \
          port_num, magic, bp,                     \
-         ax, bx, cx, dx, si, di)
+         ax, bx, cx, dx, si, di)                  \
+         (void) bp;                               \
+         (void) ax; (void) bx; (void) cx;         \
+         (void) dx; (void) si; (void) di;
 
 #endif /* #if PIPE_CC_GCC */
 
@@ -283,7 +293,7 @@ struct rpc_channel {
 static enum pipe_error
 svga_open_channel(struct rpc_channel *channel, unsigned protocol)
 {
-   VMW_REG ax, bx, cx, dx, si = 0, di = 0;
+   VMW_REG ax = 0, bx = 0, cx = 0, dx = 0, si = 0, di = 0;
 
    VMW_PORT(VMW_PORT_CMD_OPEN_CHANNEL,
       (protocol | GUESTMSG_FLAG_COOKIE), si, di,
@@ -313,7 +323,7 @@ svga_open_channel(struct rpc_channel *channel, unsigned protocol)
 static enum pipe_error
 svga_close_channel(struct rpc_channel *channel)
 {
-   VMW_REG ax, bx, cx, dx, si, di;
+   VMW_REG ax = 0, bx = 0, cx = 0, dx = 0, si, di;
 
    /* Set up additional parameters */
    si = channel->cookie_high;
@@ -344,7 +354,7 @@ svga_close_channel(struct rpc_channel *channel)
 static enum pipe_error
 svga_send_msg(struct rpc_channel *channel, const char *msg)
 {
-   VMW_REG ax, bx, cx, dx, si, di, bp;
+   VMW_REG ax = 0, bx = 0, cx = 0, dx = 0, si, di, bp;
    size_t msg_len = strlen(msg);
    int retries = 0;