[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] [Mini-OS] Optimize IA64's get_current()



Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx>

diff -r a66bdc82d8fa extras/mini-os/include/ia64/arch_sched.h
--- a/extras/mini-os/include/ia64/arch_sched.h  Wed Jan 16 11:44:41 2008 +0000
+++ b/extras/mini-os/include/ia64/arch_sched.h  Thu Jan 17 12:29:01 2008 +0000
@@ -82,8 +82,7 @@ void arch_switch_threads(struct thread* 
 
 static inline struct thread* get_current(void)
 {
-       struct thread *current;
-       __asm ("mov %0=r13" : "=r" (current));
+       register struct thread *current asm("r13");
        return current;
 }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.