aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2005-09-03 18:56:38 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:11 -0400
commit2f2984eb4afb2a4298e3186cb49cc7e88dd6d929 (patch)
tree213dfa4726dd010b226fbfffac9da0fbe140b3fe /include
parent4d37e7e3fd851428dede4d05d3e69d03795a744a (diff)
[PATCH] i386: generate better code around descriptor update and access functions
GCC can generate better code around descriptor update and access functions when there is not an explicit "eax" register constraint. Testing: You won't boot if this is messed up, since the TSS descriptor will be corrupted. Verified the assembler and booted. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/desc.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 9a0b85a52e71..ccb11c032839 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -27,8 +27,8 @@ struct Xgt_desc_struct {
27 27
28extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; 28extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
29 29
30#define load_TR_desc() __asm__ __volatile__("ltr %%ax"::"a" (GDT_ENTRY_TSS*8)) 30#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))
31#define load_LDT_desc() __asm__ __volatile__("lldt %%ax"::"a" (GDT_ENTRY_LDT*8)) 31#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8))
32 32
33#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) 33#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr))
34#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) 34#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr))
@@ -49,14 +49,14 @@ extern void set_intr_gate(unsigned int irq, void * addr);
49 49
50#define _set_tssldt_desc(n,addr,limit,type) \ 50#define _set_tssldt_desc(n,addr,limit,type) \
51__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ 51__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
52 "movw %%ax,2(%2)\n\t" \ 52 "movw %w1,2(%2)\n\t" \
53 "rorl $16,%%eax\n\t" \ 53 "rorl $16,%1\n\t" \
54 "movb %%al,4(%2)\n\t" \ 54 "movb %b1,4(%2)\n\t" \
55 "movb %4,5(%2)\n\t" \ 55 "movb %4,5(%2)\n\t" \
56 "movb $0,6(%2)\n\t" \ 56 "movb $0,6(%2)\n\t" \
57 "movb %%ah,7(%2)\n\t" \ 57 "movb %h1,7(%2)\n\t" \
58 "rorl $16,%%eax" \ 58 "rorl $16,%1" \
59 : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type)) 59 : "=m"(*(n)) : "q" (addr), "r"(n), "ir"(limit), "i"(type))
60 60
61static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) 61static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr)
62{ 62{