Move the IDTVEC() macro to <machine/asm.h>, and make it work with

an ISO C preprocessor.
This commit is contained in:
thorpej 2002-05-31 18:07:31 +00:00
parent dd82a277b7
commit 3a00c62229
4 changed files with 21 additions and 34 deletions

View File

@ -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 @@ ENTRY(savectx)
* 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)

View File

@ -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.
@ -100,16 +100,6 @@
#define _ALIGN_TEXT ALIGN_TEXT
#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.
*/

View File

@ -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.
@ -100,16 +100,6 @@
#define _ALIGN_TEXT ALIGN_TEXT
#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.
*/

View File

@ -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 \