bug-hurd
[Top][All Lists]
Advanced

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

GNU Mach 1.3 and gcc 3.3.x


From: Alfred M. Szmidt
Subject: GNU Mach 1.3 and gcc 3.3.x
Date: Tue, 13 Jan 2004 18:57:55 +0100 (MET)

Hi,

the pickiness of gcc 3.3.x about asm() breaks GNU Mach compilation.  I
haven't attached a ChangeLog since 1.3 is essentially considered dead
by some, but I like it more then 2.x.

You will still probobly need the patch that fixes the sed line
[gnumach]/Makefile so that it compiles with newer versions of
binutils.

Index: i386/i386/gdt.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/gdt.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gdt.c
--- i386/i386/gdt.c     25 Feb 1997 21:27:09 -0000      1.1.1.1
+++ i386/i386/gdt.c     13 Jan 2004 17:49:00 -0000
@@ -72,17 +72,16 @@
           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));
 }
 
Index: i386/i386/proc_reg.h
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/Attic/proc_reg.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 proc_reg.h
--- i386/i386/proc_reg.h        25 Feb 1997 21:27:11 -0000      1.1.1.1
+++ i386/i386/proc_reg.h        13 Jan 2004 17:49:00 -0000
@@ -138,11 +138,9 @@
 /* This doesn't set a processor register,
    but it's often used immediately after setting one,
    to flush the instruction queue.  */
-#define flush_instr_queue() \
-       asm("
-               jmp     0f
-               0:
-       ")
+#define flush_instr_queue()                    \
+       asm("jmp 0f\n"                          \
+           "0:\n")
 
 #endif /* __GNUC__ */
 #endif /* ASSEMBLER */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]