public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: [PATCH] Fix msr register allocation
Date: Mon, 30 Jul 2007 12:25:54 -0300	[thread overview]
Message-ID: <1185809155.4347.20.camel@t60> (raw)

Since the value in ret will go through a return statement,
it does not need to be put in eax register directly. Instead,
we let the compiler do his job and choose what to do with it,
potentially getting a better register allocation.
    
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>

diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h
index df21ea0..cc4263c 100644
--- a/include/asm-i386/msr.h
+++ b/include/asm-i386/msr.h
@@ -54,7 +54,7 @@ static inline int native_write_msr_safe(unsigned int msr,
 		     "   .align 4\n\t"
 		     "   .long 	2b,3b\n\t"
 		     ".previous"
-		     : "=a" (err)
+		     : "=r" (err)
 		     : "c" (msr), "0" ((u32)val), "d" ((u32)(val>>32)),
 		       "i" (-EFAULT));
 	return err;



             reply	other threads:[~2007-07-30 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30 15:25 Glauber de Oliveira Costa [this message]
2007-07-30 15:37 ` [PATCH] Fix msr register allocation Björn Steinbrink
2007-07-30 16:35   ` Glauber de Oliveira Costa
2007-07-30 19:59     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1185809155.4347.20.camel@t60 \
    --to=gcosta@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox