191586Smarkm/*	$NetBSD: lp64.h,v 1.1 2002/01/18 20:39:23 thorpej Exp $	*/
291586Smarkm
391586Smarkm/*
491586Smarkm * Copyright (c) 2001 Wasabi Systems, Inc.
591586Smarkm * All rights reserved.
691586Smarkm *
791586Smarkm * Written by Jason R. Thorpe for Wasabi Systems, Inc.
891586Smarkm *
991586Smarkm * Redistribution and use in source and binary forms, with or without
1091586Smarkm * modification, are permitted provided that the following conditions
1191586Smarkm * are met:
1291586Smarkm * 1. Redistributions of source code must retain the above copyright
1391586Smarkm *    notice, this list of conditions and the following disclaimer.
1491586Smarkm * 2. Redistributions in binary form must reproduce the above copyright
1591586Smarkm *    notice, this list of conditions and the following disclaimer in the
1691586Smarkm *    documentation and/or other materials provided with the distribution.
1791586Smarkm * 3. All advertising materials mentioning features or use of this software
1891586Smarkm *    must display the following acknowledgement:
1991586Smarkm *	This product includes software developed for the NetBSD Project by
2091586Smarkm *	Wasabi Systems, Inc.
2191586Smarkm * 4. The name of Wasabi Systems, Inc. may not be used to endorse
2291586Smarkm *    or promote products derived from this software without specific prior
2391586Smarkm *    written permission.
2491586Smarkm *
2591586Smarkm * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
2691586Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2791586Smarkm * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2891586Smarkm * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
2991586Smarkm * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3091586Smarkm * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3191586Smarkm * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3291586Smarkm * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3391586Smarkm * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3491586Smarkm * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3591586Smarkm * POSSIBILITY OF SUCH DAMAGE.
3691586Smarkm */
3791586Smarkm
3891586Smarkm/*
3991586Smarkm * Type sizes for LP64 platforms (long, pointer: 64-bit)
4091586Smarkm */
4191586Smarkm
4291586Smarkm#define	CHAR_SIZE	(CHAR_BIT)
4391586Smarkm#define	SHORT_SIZE	(2 * CHAR_BIT)
4491586Smarkm#define	INT_SIZE	(4 * CHAR_BIT)
4591586Smarkm#define	LONG_SIZE	(8 * CHAR_BIT)
4691586Smarkm#define	QUAD_SIZE	(8 * CHAR_BIT)
4791586Smarkm#define	PTR_SIZE	(8 * CHAR_BIT)
4891586Smarkm
4991586Smarkm#define	TARG_INT_MAX	((int32_t) (((uint32_t) -1) >> 1))
5091586Smarkm#define	TARG_INT_MIN	((-TARG_INT_MAX) - 1)
5191586Smarkm#define	TARG_UINT_MAX	((uint32_t) -1)
5291586Smarkm
5391586Smarkm#define	TARG_QUAD_MAX	((int64_t) (((uint64_t) -1) >> 1))
5491586Smarkm#define	TARG_QUAD_MIN	((-TARG_QUAD_MAX) - 1)
5591586Smarkm#define	TARG_UQUAD_MAX	((uint64_t) -1)
5691586Smarkm
5791586Smarkm#define	TARG_LONG_MAX	TARG_QUAD_MAX
5891586Smarkm#define	TARG_LONG_MIN	TARG_QUAD_MIN
5991586Smarkm#define	TARG_ULONG_MAX	TARG_UQUAD_MAX
60