LLVM doesn't support data32/addr32, but is smart enough to figure the
necessary prefixes out.
This commit is contained in:
parent
59c1e99909
commit
7ef87bcc6b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpi_wakecode.S,v 1.11 2012/04/19 18:00:34 jym Exp $ */
|
||||
/* $NetBSD: acpi_wakecode.S,v 1.12 2014/01/15 22:24:41 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Joerg Sonnenberger <joerg@netbsd.org>
|
||||
|
@ -138,7 +138,11 @@ wakeup_16:
|
|||
1:
|
||||
|
||||
/* Load temporary 32bit GDT */
|
||||
#ifdef __clang__
|
||||
lgdt tmp_gdt
|
||||
#else
|
||||
data32 addr32 lgdt tmp_gdt
|
||||
#endif
|
||||
|
||||
/* Enable protected mode w/o paging */
|
||||
mov %cr0,%eax
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mptramp.S,v 1.16 2014/01/11 19:31:47 jakllsch Exp $ */
|
||||
/* $NetBSD: mptramp.S,v 1.17 2014/01/15 22:24:41 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -124,7 +124,11 @@ LABEL(cpu_spinup_trampoline)
|
|||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %ss
|
||||
#ifdef __clang__
|
||||
lgdt (mptramp_gdt32_desc) # load flat descriptor table
|
||||
#else
|
||||
data32 addr32 lgdt (mptramp_gdt32_desc) # load flat descriptor table
|
||||
#endif
|
||||
movl %cr0, %eax # get cr0
|
||||
orl $0x1, %eax # enable protected mode
|
||||
movl %eax, %cr0 # doit
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mptramp.S,v 1.25 2013/06/22 13:09:07 uebayasi Exp $ */
|
||||
/* $NetBSD: mptramp.S,v 1.26 2014/01/15 22:24:41 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -76,7 +76,7 @@
|
|||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mptramp.S,v 1.25 2013/06/22 13:09:07 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mptramp.S,v 1.26 2014/01/15 22:24:41 joerg Exp $");
|
||||
|
||||
#include "opt_mpbios.h" /* for MPDEBUG */
|
||||
|
||||
|
@ -125,7 +125,11 @@ LABEL(cpu_spinup_trampoline)
|
|||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %ss
|
||||
#ifdef __clang__
|
||||
lgdt (gdt_desc) # load flat descriptor table
|
||||
#else
|
||||
data32 addr32 lgdt (gdt_desc) # load flat descriptor table
|
||||
#endif
|
||||
movl %cr0, %eax # get cr0
|
||||
orl $CR0_PE, %eax # enable protected mode
|
||||
movl %eax, %cr0 # doit
|
||||
|
|
Loading…
Reference in New Issue