]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: Optimize IA64's get_current()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)
Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
include/ia64/arch_sched.h

index 139a358443a688c8931a357f33e9b51861f4b2b0..f5714a3b6d3b8d2eeb6ab0e21c84f03b8ed47e82 100644 (file)
@@ -82,8 +82,7 @@ void arch_switch_threads(struct thread* prev, struct thread* next);
 
 static inline struct thread* get_current(void)
 {
-       struct thread *current;
-       __asm ("mov %0=r13" : "=r" (current));
+       register struct thread *current asm("r13");
        return current;
 }