111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/*	$OpenBSD: _types.h,v 1.5 2008/07/21 20:50:54 martynas Exp $	*/
211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/*-
411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Copyright (c) 1990, 1993
511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *	The Regents of the University of California.  All rights reserved.
611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *
711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Redistribution and use in source and binary forms, with or without
811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * modification, are permitted provided that the following conditions
911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * are met:
1011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 1. Redistributions of source code must retain the above copyright
1111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *    notice, this list of conditions and the following disclaimer.
1211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 2. Redistributions in binary form must reproduce the above copyright
1311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *    notice, this list of conditions and the following disclaimer in the
1411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *    documentation and/or other materials provided with the distribution.
1511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 3. Neither the name of the University nor the names of its contributors
1611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *    may be used to endorse or promote products derived from this software
1711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *    without specific prior written permission.
1811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *
1911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * SUCH DAMAGE.
3011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *
3111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *	@(#)types.h	8.3 (Berkeley) 1/5/94
3211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *	@(#)ansi.h	8.2 (Berkeley) 1/4/94
3311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert */
3411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
3511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _MIPS64__TYPES_H_
3611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define _MIPS64__TYPES_H_
3711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
3811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/*
3911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *  We need to handle the various ISA levels for sizes.
4011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert */
4111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define	_MIPS_ISA_MIPS1	1	/* R2000/R3000 */
4211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define	_MIPS_ISA_MIPS2	2	/* R4000/R6000 */
4311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define	_MIPS_ISA_MIPS3	3	/* R4000 */
4411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define	_MIPS_ISA_MIPS4	4	/* TFP (R1x000) */
4511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
4611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 7.18.1.1 Exact-width integer types */
4711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__signed char		__int8_t;
4811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	unsigned char		__uint8_t;
4911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	short			__int16_t;
5011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	unsigned short		__uint16_t;
5111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	int			__int32_t;
5211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	unsigned int		__uint32_t;
5311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* LONGLONG */
5411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	long long		__int64_t;
5511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* LONGLONG */
5611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	unsigned long long	__uint64_t;
5711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
5811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 7.18.1.2 Minimum-width integer types */
5911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int8_t		__int_least8_t;
6011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint8_t		__uint_least8_t;
6111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int16_t		__int_least16_t;
6211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint16_t		__uint_least16_t;
6311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int32_t		__int_least32_t;
6411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint32_t		__uint_least32_t;
6511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int64_t		__int_least64_t;
6611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint64_t		__uint_least64_t;
6711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
6811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 7.18.1.3 Fastest minimum-width integer types */
6911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int32_t		__int_fast8_t;
7011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint32_t		__uint_fast8_t;
7111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int32_t		__int_fast16_t;
7211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint32_t		__uint_fast16_t;
7311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int32_t		__int_fast32_t;
7411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint32_t		__uint_fast32_t;
7511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int64_t		__int_fast64_t;
7611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint64_t		__uint_fast64_t;
7711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
7811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 7.18.1.4 Integer types capable of holding object pointers */
7911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	long			__intptr_t;
8011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	unsigned long		__uintptr_t;
8111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
8211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 7.18.1.5 Greatest-width integer types */
8311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__int64_t		__intmax_t;
8411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__uint64_t		__uintmax_t;
8511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
8611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* Register size */
8711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4)
8811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef __int64_t		__register_t;
8911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef __int64_t		f_register_t;	/* XXX */
9011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#else
9111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef __int32_t		__register_t;
9211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef __int32_t		f_register_t;	/* XXX */
9311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
9411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
9511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* VM system types */
9611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef unsigned long		__vaddr_t;
9711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef unsigned long		__paddr_t;
9811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef unsigned long		__vsize_t;
9911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef unsigned long		__psize_t;
10011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
10111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* Standard system types */
10211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef int			__clock_t;
10311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef int			__clockid_t;
10411cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef double			__double_t;
10511cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef float			__float_t;
10611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef long long		__off_t;
10711cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef long			__ptrdiff_t;
10811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	int			__time_t;
10911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef int			__timer_t;
11011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if defined(__GNUC__) && __GNUC__ >= 3
11111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	__builtin_va_list	__va_list;
11211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#else
11311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	char *			__va_list;
11411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
11511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
11611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* Wide character support types */
11711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef __cplusplus
11811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	int			__wchar_t;
11911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
12011cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef int			__wint_t;
12111cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	int			__rune_t;
12211cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	void *			__wctrans_t;
12311cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef	void *			__wctype_t;
12411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
12511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#if defined(_KERNEL)
12611cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttypedef struct label_t {
12711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert	__register_t val[14];
12811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert} label_t;
12911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif
13011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* XXX check why this still has to be defined. pmap.c issue? */
13211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __SWAP_BROKEN
13311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* Feature test macros */
13511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define __HAVE_TIMECOUNTER
13611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert
13711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif	/* _MIPS64__TYPES_H_ */
138