From: Samuel Thibault Subject: [PATCH] [Mini-OS] Optimize IA64's get_current() Date: Thu, 17 Jan 2008 13:29:00 +0000 Message-ID: <20080117132900.GA11129@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Let gcc access r13 itself, leading to better code Signed-off-by: Samuel Thibault 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; }