#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
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), \
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;" : \
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" : \
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;" : \
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" : \
#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 */
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,
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;
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;