From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: jamie@shareable.org, linux-kernel@vger.kernel.org
Subject: Re: asm (lidt) question
Date: Tue, 22 Jul 2003 11:58:23 -0700 [thread overview]
Message-ID: <20030722115823.4b34f9ce.rddunlap@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.55.0307221021130.1372@bigblue.dev.mcafeelabs.com>
On Tue, 22 Jul 2003 10:31:37 -0700 (PDT) Davide Libenzi <davidel@xmailserver.org> wrote:
| On Tue, 22 Jul 2003, Jamie Lokier wrote:
|
| > Davide Libenzi wrote:
| > > IMHO, since "var" is really an output parameter.
| >
| > "var" is read, not written.
| > I think you are confusing "lidt" with "sidt".
|
| Actually I don't even know what I was confusing, since L and S are not
| there for nothing ;) And yes, the form with =m as input parameter should
| be corrected, even if it generates the same code.
Yes, less confusion is better, so here's a patch to use the
same reasonable syntax in all places.
Look OK? Generates the same code, as Davide pointed out.
--
~Randy
patch_name: lidt_norm.patch
patch_version: 2003-07-22.11:47:21
author: Randy.Dunlap <rddunlap@osdl.org>
description: normalize lidt/lgdt syntax usage
product: Linux
product_versions: 2.6.0-test1
diffstat: =
arch/i386/kernel/cpu/common.c | 4 ++--
arch/i386/kernel/traps.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff -Naur ./arch/i386/kernel/cpu/common.c~lidt ./arch/i386/kernel/cpu/common.c
--- ./arch/i386/kernel/cpu/common.c~lidt 2003-07-13 20:29:29.000000000 -0700
+++ ./arch/i386/kernel/cpu/common.c 2003-07-22 11:41:05.000000000 -0700
@@ -480,8 +480,8 @@
*/
memcpy(thread->tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES * 8);
- __asm__ __volatile__("lgdt %0": "=m" (cpu_gdt_descr[cpu]));
- __asm__ __volatile__("lidt %0": "=m" (idt_descr));
+ __asm__ __volatile__("lgdt %0": :"m" (cpu_gdt_descr[cpu]));
+ __asm__ __volatile__("lidt %0": :"m" (idt_descr));
/*
* Delete NT
diff -Naur ./arch/i386/kernel/traps.c~lidt ./arch/i386/kernel/traps.c
--- ./arch/i386/kernel/traps.c~lidt 2003-07-13 20:31:20.000000000 -0700
+++ ./arch/i386/kernel/traps.c 2003-07-22 11:39:31.000000000 -0700
@@ -780,7 +780,7 @@
* it uses the read-only mapped virtual address.
*/
idt_descr.address = fix_to_virt(FIX_F00F_IDT);
- __asm__ __volatile__("lidt %0": "=m" (idt_descr));
+ __asm__ __volatile__("lidt %0": :"m" (idt_descr));
}
#endif
next prev parent reply other threads:[~2003-07-22 18:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-17 22:28 asm (lidt) question Randy.Dunlap
2003-07-17 22:36 ` Davide Libenzi
2003-07-17 23:18 ` Davide Libenzi
2003-07-17 23:31 ` Randy.Dunlap
2003-07-17 23:36 ` Davide Libenzi
2003-07-22 17:27 ` Jamie Lokier
2003-07-22 17:31 ` Davide Libenzi
2003-07-22 17:50 ` Richard B. Johnson
2003-07-22 17:54 ` Davide Libenzi
2003-07-22 18:58 ` Randy.Dunlap [this message]
2003-07-22 18:58 ` Davide Libenzi
2003-07-22 19:04 ` Randy.Dunlap
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=20030722115823.4b34f9ce.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=davidel@xmailserver.org \
--cc=jamie@shareable.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;
as well as URLs for NNTP newsgroup(s).