Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/isa Make this work with an ISO C preprocessor.



details:   https://anonhg.NetBSD.org/src/rev/98b456f69848
branches:  trunk
changeset: 532121:98b456f69848
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 31 18:22:54 2002 +0000

description:
Make this work with an ISO C preprocessor.

diffstat:

 sys/arch/i386/isa/vector.s |  70 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 64 insertions(+), 6 deletions(-)

diffs (107 lines):

diff -r ec8b093db515 -r 98b456f69848 sys/arch/i386/isa/vector.s
--- a/sys/arch/i386/isa/vector.s        Fri May 31 18:07:31 2002 +0000
+++ b/sys/arch/i386/isa/vector.s        Fri May 31 18:22:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vector.s,v 1.48 2001/09/21 14:12:52 fvdl Exp $ */
+/*     $NetBSD: vector.s,v 1.49 2002/05/31 18:22:54 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -159,20 +159,78 @@
 
 /* XXX See comment in locore.s */
 #ifdef __ELF__
+
+#ifdef __STDC__
+#define        XINTR(irq_num)          Xintr ## irq_num
+#define        XHOLD(irq_num)          Xhold ## irq_num
+#define        XSTRAY(irq_num)         Xstray ## irq_num
+#else
 #define        XINTR(irq_num)          Xintr/**/irq_num
 #define        XHOLD(irq_num)          Xhold/**/irq_num
 #define        XSTRAY(irq_num)         Xstray/**/irq_num
+#endif /* __STDC__ */
+
+/* XXX Duplicates of IDTVEC() from locore.s */
+#ifdef __STDC__
+#define        XRESUME_VEC(irq_num)                                            \
+       ALIGN_TEXT; .globl Xresume ## irq_num; Xresume ## irq_num:
+#define        XRECURSE_VEC(irq_num)                                           \
+       ALIGN_TEXT; .globl Xrecurse ## irq_num; Xrecurse ## irq_num:
+#define        XSTRAY_VEC(irq_num)                                             \
+       ALIGN_TEXT; .globl Xstray ## irq_num; Xstray ## irq_num:
+#define        XHOLD_VEC(irq_num)                                              \
+       ALIGN_TEXT; .globl Xhold ## irq_num; Xhold ## irq_num:
+#else
+#define        XRESUME_VEC(irq_num)                                            \
+       ALIGN_TEXT; .globl Xresume/**/irq_num; Xresume/**/irq_num:
+#define        XRECURSE_VEC(irq_num)                                           \
+       ALIGN_TEXT; .globl Xrecurse/**/irq_num; Xrecurse/**/irq_num:
+#define        XSTRAY_VEC(irq_num)                                             \
+       ALIGN_TEXT; .globl Xstray/**/irq_num; Xstray/**/irq_num:
+#define        XHOLD_VEC(irq_num)                                              \
+       ALIGN_TEXT; .globl Xhold/**/irq_num; Xhold/**/irq_num:
+#endif /* __STDC__ */
+
+#else
+
+#ifdef __STDC__
+#define        XINTR(irq_num)          _Xintr ## irq_num
+#define        XHOLD(irq_num)          _Xhold ## irq_num
+#define        XSTRAY(irq_num)         _Xstray ## irq_num
 #else
 #define        XINTR(irq_num)          _Xintr/**/irq_num
 #define        XHOLD(irq_num)          _Xhold/**/irq_num
 #define        XSTRAY(irq_num)         _Xstray/**/irq_num
-#endif
+#endif /* __STDC__ */
+
+/* XXX Duplicates of IDTVEC() from locore.s */
+#ifdef __STDC__
+#define        XRESUME_VEC(irq_num)                                            \
+       ALIGN_TEXT; .globl _Xresume ## irq_num; _Xresume ## irq_num:
+#define        XRECURSE_VEC(irq_num)                                           \
+       ALIGN_TEXT; .globl _Xrecurse ## irq_num; _Xrecurse ## irq_num:
+#define        XSTRAY_VEC(irq_num)                                             \
+       ALIGN_TEXT; .globl _Xstray ## irq_num; _Xstray ## irq_num:
+#define        XHOLD_VEC(irq_num)                                              \
+       ALIGN_TEXT; .globl _Xhold ## irq_num; _Xhold ## irq_num:
+#else
+#define        XRESUME_VEC(irq_num)                                            \
+       ALIGN_TEXT; .globl _Xresume/**/irq_num; _Xresume/**/irq_num:
+#define        XRECURSE_VEC(irq_num)                                           \
+       ALIGN_TEXT; .globl _Xrecurse/**/irq_num; _Xrecurse/**/irq_num:
+#define        XSTRAY_VEC(irq_num)                                             \
+       ALIGN_TEXT; .globl _Xstray/**/irq_num; _Xstray/**/irq_num:
+#define        XHOLE_VEC(irq_num)                                              \
+       ALIGN_TEXT; .globl _Xhold/**/irq_num; _Xhold/**/irq_num:
+#endif /* __STDC__ */
+
+#endif /* __ELF__ */
 
 #define        INTR(irq_num, icu, ack) \
-IDTVEC(resume/**/irq_num)                                              ;\
+XRESUME_VEC(irq_num)                                                   ;\
        cli                                                             ;\
        jmp     1f                                                      ;\
-IDTVEC(recurse/**/irq_num)                                             ;\
+XRECURSE_VEC(irq_num)                                                  ;\
        pushfl                                                          ;\
        pushl   %cs                                                     ;\
        pushl   %esi                                                    ;\
@@ -212,13 +270,13 @@
        STRAY_TEST                      /* see if it's a stray */       ;\
 5:     UNMASK(irq_num, icu)            /* unmask it in hardware */     ;\
        jmp     _C_LABEL(Xdoreti)       /* lower spl and do ASTs */     ;\
-IDTVEC(stray/**/irq_num)                                               ;\
+XSTRAY_VEC(irq_num)                                                    ;\
        pushl   $irq_num                                                ;\
        call    _C_LABEL(isa_strayintr)                                 ;\
        addl    $4,%esp                                                 ;\
        incl    _C_LABEL(strayintrcnt) + (4*(irq_num))                  ;\
        jmp     5b                                                      ;\
-IDTVEC(hold/**/irq_num)                                                        ;\
+XHOLD_VEC(irq_num)                                                     ;\
        orb     $IRQ_BIT(irq_num),_C_LABEL(ipending) + IRQ_BYTE(irq_num) ;\
        INTRFASTEXIT
 



Home | Main Index | Thread Index | Old Index