cdefs.h revision 1.9 1 1.9 castor /* $NetBSD: cdefs.h,v 1.9 1999/01/31 00:55:41 castor Exp $ */
2 1.1 jtc
3 1.1 jtc /*
4 1.3 mellon * Copyright (c) 1995 Carnegie-Mellon University.
5 1.3 mellon * All rights reserved.
6 1.3 mellon *
7 1.3 mellon * Author: Chris G. Demetriou
8 1.3 mellon *
9 1.3 mellon * Permission to use, copy, modify and distribute this software and
10 1.3 mellon * its documentation is hereby granted, provided that both the copyright
11 1.3 mellon * notice and this permission notice appear in all copies of the
12 1.3 mellon * software, derivative works or modified versions, and any portions
13 1.3 mellon * thereof, and that both notices appear in supporting documentation.
14 1.3 mellon *
15 1.3 mellon * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 1.3 mellon * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 1.3 mellon * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 1.3 mellon *
19 1.3 mellon * Carnegie Mellon requests users of this software to return to
20 1.3 mellon *
21 1.3 mellon * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 1.3 mellon * School of Computer Science
23 1.3 mellon * Carnegie Mellon University
24 1.3 mellon * Pittsburgh PA 15213-3890
25 1.3 mellon *
26 1.3 mellon * any improvements or extensions that they make and grant Carnegie the
27 1.3 mellon * rights to redistribute these changes.
28 1.1 jtc */
29 1.1 jtc
30 1.8 castor #ifndef _MIPS_CDEFS_H_
31 1.8 castor #define _MIPS_CDEFS_H_
32 1.8 castor
33 1.8 castor /* MIPS Subprogram Interface Model */
34 1.8 castor #define _MIPS_SIM_ABIX32 4 /* 64 bit safe, ILP32 o32 model */
35 1.8 castor #define _MIPS_SIM_ABI64 3
36 1.8 castor #define _MIPS_SIM_NABI32 2 /* 64bit safe, ILP32 n32 model */
37 1.8 castor #define _MIPS_SIM_ABI32 1
38 1.9 castor
39 1.9 castor #define _MIPS_BSD_API_LP32 _MIPS_SIM_ABI32
40 1.9 castor #define _MIPS_BSD_API_LP32_64CLEAN _MIPS_SIM_ABIX32
41 1.9 castor #define _MIPS_BSD_API_N32 _MIPS_SIM_NABI32
42 1.9 castor #define _MIPS_BSD_API_LP64 _MIPS_SIM_ABI64
43 1.9 castor
44 1.1 jtc
45 1.7 thorpej #define _C_LABEL(x) x
46 1.6 thorpej
47 1.6 thorpej #ifdef __GNUC__
48 1.7 thorpej #define __RENAME(x) __asm__(___STRING(_C_LABEL(x)))
49 1.6 thorpej #endif
50 1.1 jtc
51 1.3 mellon #define __indr_references(sym,msg) /* nothing */
52 1.4 jonathan
53 1.4 jonathan #if defined __GNUC__ && defined __STDC__
54 1.4 jonathan #define __warn_references(sym, msg) \
55 1.4 jonathan static const char __evoke_link_warning_##sym[] \
56 1.4 jonathan __attribute__ ((section (".gnu.warning." #sym))) = msg;
57 1.4 jonathan #else
58 1.3 mellon #define __warn_references(sym,msg) /* nothing */
59 1.4 jonathan #endif
60 1.5 jonathan
61 1.5 jonathan /* Kernel-only .sections for kernel copyright */
62 1.5 jonathan #ifdef _KERNEL
63 1.5 jonathan
64 1.5 jonathan #ifdef __STDC__
65 1.5 jonathan #define __KERNEL_SECTIONSTRING(_sec, _str) \
66 1.5 jonathan __asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
67 1.5 jonathan #else
68 1.5 jonathan #define __KERNEL_SECTIONSTRING(_sec, _str) \
69 1.5 jonathan __asm__(".section _sec ; .asciz _str ; .text")
70 1.5 jonathan #endif
71 1.5 jonathan
72 1.5 jonathan #define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s)
73 1.5 jonathan #define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s)
74 1.5 jonathan
75 1.5 jonathan #ifdef NO_KERNEL_RCSIDS
76 1.5 jonathan #undef __KERNEL_RCSID
77 1.5 jonathan #define __KERNEL_RCSID(_n, _s) /* nothing */
78 1.5 jonathan #endif
79 1.5 jonathan
80 1.5 jonathan #endif /* _KERNEL */
81 1.1 jtc
82 1.8 castor #endif /* !_MIPS_CDEFS_H_ */
83