From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: linux-kernel@vger.kernel.org, akpm@google.com
Subject: [PATCH] Oddity in mxcsr_feature_mask_init()
Date: Fri, 8 Jun 2007 18:22:50 +0800 [thread overview]
Message-ID: <20070608102250.GE4943@implementation> (raw)
Hi,
In arch/i386/kernel/i387.c:mxcsr_feature_mask_init(), one can read:
asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave));
But I would rather have written:
asm("fxsave %0" : "=m" (current->thread.i387.fxsave));
Considering the code around, it doesn't do much difference, but it makes
more sense (i.e. we just fill fxsave).
Samuel
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
--- linux-2.6.21-orig/arch/i386/kernel/i387.c.orig 2007-06-08 18:18:10.000000000 +0800
+++ linux-2.6.21-orig/arch/i386/kernel/i387.c 2007-06-08 18:18:22.000000000 +0800
@@ -32,7 +32,7 @@
clts();
if (cpu_has_fxsr) {
memset(¤t->thread.i387.fxsave, 0, sizeof(struct i387_fxsave_struct));
- asm volatile("fxsave %0" : : "m" (current->thread.i387.fxsave));
+ asm("fxsave %0" : "=m" (current->thread.i387.fxsave));
mask = current->thread.i387.fxsave.mxcsr_mask;
if (mask == 0) mask = 0x0000ffbf;
}
reply other threads:[~2007-06-08 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070608102250.GE4943@implementation \
--to=samuel.thibault@ens-lyon.org \
--cc=akpm@google.com \
--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