Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386 Move the IDTVEC() macro to <machine/asm.h>, an...



details:   https://anonhg.NetBSD.org/src/rev/ec8b093db515
branches:  trunk
changeset: 532120:ec8b093db515
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 31 18:07:31 2002 +0000

description:
Move the IDTVEC() macro to <machine/asm.h>, and make it work with
an ISO C preprocessor.

diffstat:

 sys/arch/i386/i386/locore.s       |  12 +-----------
 sys/arch/i386/i386/mach_sigcode.s |  12 +-----------
 sys/arch/i386/i386/svr4_sigcode.s |  12 +-----------
 sys/arch/i386/include/asm.h       |  19 ++++++++++++++++++-
 4 files changed, 21 insertions(+), 34 deletions(-)

diffs (111 lines):

diff -r f0ab2e9bf538 -r ec8b093db515 sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Fri May 31 17:53:03 2002 +0000
+++ b/sys/arch/i386/i386/locore.s       Fri May 31 18:07:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.254 2002/04/09 16:41:08 mycroft Exp $     */
+/*     $NetBSD: locore.s,v 1.255 2002/05/31 18:07:31 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -2085,16 +2085,6 @@
  * handler.
  */ 
 
-/*
- * XXX traditional CPP's evaluation semantics make this necessary.
- * XXX (__CONCAT() would be evaluated incorrectly)
- */
-#ifdef __ELF__
-#define        IDTVEC(name)    ALIGN_TEXT; .globl X/**/name; X/**/name:
-#else
-#define        IDTVEC(name)    ALIGN_TEXT; .globl _X/**/name; _X/**/name:
-#endif
-
 #define        TRAP(a)         pushl $(a) ; jmp _C_LABEL(alltraps)
 #define        ZTRAP(a)        pushl $0 ; TRAP(a)
 
diff -r f0ab2e9bf538 -r ec8b093db515 sys/arch/i386/i386/mach_sigcode.s
--- a/sys/arch/i386/i386/mach_sigcode.s Fri May 31 17:53:03 2002 +0000
+++ b/sys/arch/i386/i386/mach_sigcode.s Fri May 31 18:07:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mach_sigcode.s,v 1.2 2001/10/28 01:38:52 christos Exp $        */
+/*     $NetBSD: mach_sigcode.s,v 1.3 2002/05/31 18:07:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -101,16 +101,6 @@
 #include <machine/asm.h>
 
 /*
- * XXX traditional CPP's evaluation semantics make this necessary.
- * XXX (__CONCAT() would be evaluated incorrectly)
- */
-#ifdef __ELF__
-#define        IDTVEC(name)    ALIGN_TEXT; .globl X/**/name; X/**/name:
-#else
-#define        IDTVEC(name)    ALIGN_TEXT; .globl _X/**/name; _X/**/name:
-#endif
-
-/*
  * These are used on interrupt or trap entry or exit.
  */
 #define        INTRENTRY \
diff -r f0ab2e9bf538 -r ec8b093db515 sys/arch/i386/i386/svr4_sigcode.s
--- a/sys/arch/i386/i386/svr4_sigcode.s Fri May 31 17:53:03 2002 +0000
+++ b/sys/arch/i386/i386/svr4_sigcode.s Fri May 31 18:07:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_sigcode.s,v 1.6 2001/10/31 18:16:02 jdolecek Exp $        */
+/*     $NetBSD: svr4_sigcode.s,v 1.7 2002/05/31 18:07:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -101,16 +101,6 @@
 #include <machine/asm.h>
 
 /*
- * XXX traditional CPP's evaluation semantics make this necessary.
- * XXX (__CONCAT() would be evaluated incorrectly)
- */
-#ifdef __ELF__
-#define        IDTVEC(name)    ALIGN_TEXT; .globl X/**/name; X/**/name:
-#else
-#define        IDTVEC(name)    ALIGN_TEXT; .globl _X/**/name; _X/**/name:
-#endif
-
-/*
  * These are used on interrupt or trap entry or exit.
  */
 #define        INTRENTRY \
diff -r f0ab2e9bf538 -r ec8b093db515 sys/arch/i386/include/asm.h
--- a/sys/arch/i386/include/asm.h       Fri May 31 17:53:03 2002 +0000
+++ b/sys/arch/i386/include/asm.h       Fri May 31 18:07:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.20 2002/01/13 12:44:31 drochner Exp $        */
+/*     $NetBSD: asm.h,v 1.21 2002/05/31 18:07:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -92,6 +92,23 @@
 #define _ENTRY(x) \
        .text; _ALIGN_TEXT; .globl x; .type x,@function; x:
 
+#ifdef _KERNEL
+/* XXX Can't use __CONCAT() here, as it would be evaluated incorrectly. */
+#ifdef __ELF__
+#ifdef __STDC__
+#define        IDTVEC(name)    ALIGN_TEXT; .globl X ## name; X ## name:
+#else 
+#define        IDTVEC(name)    ALIGN_TEXT; .globl X/**/name; X/**/name:
+#endif /* __STDC__ */ 
+#else 
+#ifdef __STDC__
+#define        IDTVEC(name)    ALIGN_TEXT; .globl _X ## name; _X ## name: 
+#else
+#define        IDTVEC(name)    ALIGN_TEXT; .globl _X/**/name; _X/**/name:
+#endif /* __STDC__ */
+#endif /* __ELF__ */
+#endif /* _KERNEL */
+
 #ifdef GPROF
 # ifdef __ELF__
 #  define _PROF_PROLOGUE       \



Home | Main Index | Thread Index | Old Index