summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-01-14 22:28:30 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:15:24 +0200
commit3574e6d2024f5d8d0a0a78ce7785eda92571a81e (patch)
tree33e86bfe6cddb99f51b99440e63c10ef2c0b4aac /i386
parent69e15247bf8b82792b7c1d041ae5babb63a63862 (diff)
2004-01-15 Alfred M. Szmidt <ams@kemisten.nu>
* linux/dev/include/asm-i386/string.h (memscan): Don't use multi-line string literals for asm(). * linux/dev/include/asm-i386/segment.h (__generic_memcpy_tofs) (__generic_memcpy_fromfs): Likewise. * i386/i386/proc_reg.h (flush_instr_queue): Likewise. * i386/i386/gdt.c (gdt_init): Likewise.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/gdt.c23
-rw-r--r--i386/i386/proc_reg.h6
2 files changed, 13 insertions, 16 deletions
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index d855111..6766051 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -72,17 +72,16 @@ gdt_init()
We must load ds and es with 0 before loading them with KERNEL_DS
because some processors will "optimize out" the loads
if the previous selector values happen to be the same. */
- asm volatile("
- ljmp %0,$1f
- 1:
- movw %w2,%%ds
- movw %w2,%%es
- movw %w2,%%fs
- movw %w2,%%gs
-
- movw %w1,%%ds
- movw %w1,%%es
- movw %w1,%%ss
- " : : "i" (KERNEL_CS), "r" (KERNEL_DS), "r" (0));
+ asm volatile("ljmp %0,$1f\n"
+ "1:\n"
+ "movw %w2,%%ds\n"
+ "movw %w2,%%es\n"
+ "movw %w2,%%fs\n"
+ "movw %w2,%%gs\n"
+
+ "movw %w1,%%ds\n"
+ "movw %w1,%%es\n"
+ "movw %w1,%%ss\n"
+ : : "i" (KERNEL_CS), "r" (KERNEL_DS), "r" (0));
}
diff --git a/i386/i386/proc_reg.h b/i386/i386/proc_reg.h
index 1aa646b..4a3cb53 100644
--- a/i386/i386/proc_reg.h
+++ b/i386/i386/proc_reg.h
@@ -139,10 +139,8 @@ set_eflags(unsigned eflags)
but it's often used immediately after setting one,
to flush the instruction queue. */
#define flush_instr_queue() \
- asm("
- jmp 0f
- 0:
- ")
+ asm("jmp 0f\n" \
+ "0:\n")
#endif /* __GNUC__ */
#endif /* ASSEMBLER */