ia64/xen-unstable

changeset 9662:c89d62e7015a

Fix push/pop usage in tools/ioemu for x86/64.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Apr 10 17:25:42 2006 +0100 (2006-04-10)
parents 4088dd0856a9
children 7a41b35d73f4
files tools/ioemu/hw/vga.c
line diff
     1.1 --- a/tools/ioemu/hw/vga.c	Mon Apr 10 17:16:25 2006 +0100
     1.2 +++ b/tools/ioemu/hw/vga.c	Mon Apr 10 17:25:42 2006 +0100
     1.3 @@ -1369,10 +1369,16 @@ static inline unsigned int cpuid_edx(uns
     1.4  {
     1.5      unsigned int eax, edx;
     1.6  
     1.7 -    __asm__("pushl %%ebx; cpuid; popl %%ebx"
     1.8 +#ifdef __x86_64__
     1.9 +#define __bx "rbx"
    1.10 +#else
    1.11 +#define __bx "ebx"
    1.12 +#endif
    1.13 +    __asm__("push %%"__bx"; cpuid; pop %%"__bx
    1.14              : "=a" (eax), "=d" (edx)
    1.15              : "0" (op)
    1.16              : "cx");
    1.17 +#undef __ebx
    1.18  
    1.19      return edx;
    1.20  }