Home | History | Annotate | Line # | Download | only in include
cdefs.h revision 1.8
      1  1.8    castor /*	$NetBSD: cdefs.h,v 1.8 1999/01/14 18:45:46 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.1       jtc 
     39  1.7   thorpej #define	_C_LABEL(x)	x
     40  1.6   thorpej 
     41  1.6   thorpej #ifdef __GNUC__
     42  1.7   thorpej #define	__RENAME(x)	__asm__(___STRING(_C_LABEL(x)))
     43  1.6   thorpej #endif
     44  1.1       jtc 
     45  1.3    mellon #define	__indr_references(sym,msg)	/* nothing */
     46  1.4  jonathan 
     47  1.4  jonathan #if defined __GNUC__ && defined __STDC__
     48  1.4  jonathan #define __warn_references(sym, msg)                  \
     49  1.4  jonathan   static const char __evoke_link_warning_##sym[]     \
     50  1.4  jonathan     __attribute__ ((section (".gnu.warning." #sym))) = msg;
     51  1.4  jonathan #else
     52  1.3    mellon #define	__warn_references(sym,msg)	/* nothing */
     53  1.4  jonathan #endif
     54  1.5  jonathan 
     55  1.5  jonathan /* Kernel-only .sections for kernel copyright */
     56  1.5  jonathan #ifdef _KERNEL
     57  1.5  jonathan 
     58  1.5  jonathan #ifdef __STDC__
     59  1.5  jonathan #define	__KERNEL_SECTIONSTRING(_sec, _str)				\
     60  1.5  jonathan 	__asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text")
     61  1.5  jonathan #else
     62  1.5  jonathan #define	__KERNEL_SECTIONSTRING(_sec, _str)				\
     63  1.5  jonathan 	__asm__(".section _sec ; .asciz _str ; .text")
     64  1.5  jonathan #endif
     65  1.5  jonathan 
     66  1.5  jonathan #define	__KERNEL_RCSID(_n, _s)		__KERNEL_SECTIONSTRING(.ident, _s)
     67  1.5  jonathan #define	__KERNEL_COPYRIGHT(_n, _s)	__KERNEL_SECTIONSTRING(.copyright, _s)
     68  1.5  jonathan 
     69  1.5  jonathan #ifdef NO_KERNEL_RCSIDS
     70  1.5  jonathan #undef __KERNEL_RCSID
     71  1.5  jonathan #define	__KERNEL_RCSID(_n, _s)		/* nothing */
     72  1.5  jonathan #endif
     73  1.5  jonathan 
     74  1.5  jonathan #endif /* _KERNEL */
     75  1.1       jtc 
     76  1.8    castor #endif /* !_MIPS_CDEFS_H_ */
     77