Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch LLVM doesn't support data32/addr32, but is smart en...



details:   https://anonhg.NetBSD.org/src/rev/7aa6b49eecc8
branches:  trunk
changeset: 326016:7aa6b49eecc8
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jan 15 22:24:41 2014 +0000

description:
LLVM doesn't support data32/addr32, but is smart enough to figure the
necessary prefixes out.

diffstat:

 sys/arch/amd64/acpi/acpi_wakecode.S |  6 +++++-
 sys/arch/amd64/amd64/mptramp.S      |  6 +++++-
 sys/arch/i386/i386/mptramp.S        |  8 ++++++--
 3 files changed, 16 insertions(+), 4 deletions(-)

diffs (72 lines):

diff -r 191f5c3390e6 -r 7aa6b49eecc8 sys/arch/amd64/acpi/acpi_wakecode.S
--- a/sys/arch/amd64/acpi/acpi_wakecode.S       Wed Jan 15 22:23:14 2014 +0000
+++ b/sys/arch/amd64/acpi/acpi_wakecode.S       Wed Jan 15 22:24:41 2014 +0000
@@ -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@localhost>
@@ -138,7 +138,11 @@
 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
diff -r 191f5c3390e6 -r 7aa6b49eecc8 sys/arch/amd64/amd64/mptramp.S
--- a/sys/arch/amd64/amd64/mptramp.S    Wed Jan 15 22:23:14 2014 +0000
+++ b/sys/arch/amd64/amd64/mptramp.S    Wed Jan 15 22:24:41 2014 +0000
@@ -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 @@
        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
diff -r 191f5c3390e6 -r 7aa6b49eecc8 sys/arch/i386/i386/mptramp.S
--- a/sys/arch/i386/i386/mptramp.S      Wed Jan 15 22:23:14 2014 +0000
+++ b/sys/arch/i386/i386/mptramp.S      Wed Jan 15 22:24:41 2014 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index