diff options
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/gdt.c | 23 | ||||
-rw-r--r-- | i386/i386/proc_reg.h | 6 |
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 */ |