]> xenbits.xensource.com Git - xen.git/commitdiff
minios: Fix get_current() inline asm.
authorKeir Fraser <keir@xensource.com>
Tue, 16 Oct 2007 08:30:20 +0000 (09:30 +0100)
committerKeir Fraser <keir@xensource.com>
Tue, 16 Oct 2007 08:30:20 +0000 (09:30 +0100)
From: Samuel Thibault <samuel.thibault@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
extras/mini-os/include/x86/arch_sched.h

index e02dbd05a508ad1e5d480002a6171794f23c839d..6bc47f89d36e954d88539d2327c9e4e9439e7046 100644 (file)
@@ -7,9 +7,9 @@ static inline struct thread* get_current(void)
 {
     struct thread **current;
 #ifdef __i386__    
-    __asm__("andl %%esp,%0; ":"=r" (current) : "r" (~8191UL));
+    __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
 #else
-    __asm__("andq %%rsp,%0; ":"=r" (current) : "r" (~8191UL));
+    __asm__("andq %%rsp,%0; ":"=r" (current) : "0" (~8191UL));
 #endif 
     return *current;
 }