WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.4-testing] libxc: Fix cpuid() inline asm.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] libxc: Fix cpuid() inline asm.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Feb 2010 12:30:18 -0800
Delivery-date: Wed, 24 Feb 2010 12:32:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1267037423 0
# Node ID faaad66d295db90734690c7c6b2dd208d6f34d96
# Parent  9737c095f85023c26af96c27e9db2e8f38041e17
libxc: Fix cpuid() inline asm.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   20976:f8692cc67d67
xen-unstable date:        Wed Feb 24 18:48:54 2010 +0000
---
 tools/libxc/xc_cpuid_x86.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff -r 9737c095f850 -r faaad66d295d tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c        Wed Feb 24 11:15:25 2010 +0000
+++ b/tools/libxc/xc_cpuid_x86.c        Wed Feb 24 18:50:23 2010 +0000
@@ -43,12 +43,21 @@ static void cpuid(const unsigned int *in
     unsigned int count = (input[1] == XEN_CPUID_INPUT_UNUSED) ? 0 : input[1];
     asm (
 #ifdef __i386__
-        "push %%ebx; cpuid; mov %%ebx,%1; pop %%ebx"
+        "push %%ebx; push %%edx\n\t"
 #else
-        "push %%rbx; cpuid; mov %%ebx,%1; pop %%rbx"
+        "push %%rbx; push %%rdx\n\t"
 #endif
-        : "=a" (regs[0]), "=r" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
-        : "0" (input[0]), "2" (count) );
+        "cpuid\n\t"
+        "mov %%ebx,4(%4)\n\t"
+        "mov %%edx,12(%4)\n\t"
+#ifdef __i386__
+        "pop %%edx; pop %%ebx\n\t"
+#else
+        "pop %%rdx; pop %%rbx\n\t"
+#endif
+        : "=a" (regs[0]), "=c" (regs[2])
+        : "0" (input[0]), "1" (count), "S" (regs)
+        : "memory" );
 }
 
 /* Get the manufacturer brand name of the host processor. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] libxc: Fix cpuid() inline asm., Xen patchbot-3.4-testing <=