168349Sobrien/* $NetBSD: ilp32.h,v 1.1 2002/01/18 20:39:23 thorpej Exp $ */ 268349Sobrien 368349Sobrien/* 468349Sobrien * Copyright (c) 2001 Wasabi Systems, Inc. 568349Sobrien * All rights reserved. 668349Sobrien * 768349Sobrien * Written by Jason R. Thorpe for Wasabi Systems, Inc. 868349Sobrien * 968349Sobrien * Redistribution and use in source and binary forms, with or without 1068349Sobrien * modification, are permitted provided that the following conditions 1168349Sobrien * are met: 1268349Sobrien * 1. Redistributions of source code must retain the above copyright 1368349Sobrien * notice, this list of conditions and the following disclaimer. 1468349Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1568349Sobrien * notice, this list of conditions and the following disclaimer in the 1668349Sobrien * documentation and/or other materials provided with the distribution. 1768349Sobrien * 3. All advertising materials mentioning features or use of this software 1868349Sobrien * must display the following acknowledgement: 1968349Sobrien * This product includes software developed for the NetBSD Project by 2068349Sobrien * Wasabi Systems, Inc. 2168349Sobrien * 4. The name of Wasabi Systems, Inc. may not be used to endorse 2268349Sobrien * or promote products derived from this software without specific prior 2368349Sobrien * written permission. 2468349Sobrien * 2568349Sobrien * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 2668349Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2768349Sobrien * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2868349Sobrien * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 2968349Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 3068349Sobrien * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3168349Sobrien * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3268349Sobrien * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3368349Sobrien * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3468349Sobrien * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3568349Sobrien * POSSIBILITY OF SUCH DAMAGE. 3668349Sobrien */ 3768349Sobrien 3868349Sobrien/* 3968349Sobrien * Type sizes for IPL32 platforms (int, long, pointer: 32-bit) 4068349Sobrien */ 41 42#define CHAR_SIZE (CHAR_BIT) 43#define SHORT_SIZE (2 * CHAR_BIT) 44#define INT_SIZE (4 * CHAR_BIT) 45#define LONG_SIZE (4 * CHAR_BIT) 46#define QUAD_SIZE (8 * CHAR_BIT) 47#define PTR_SIZE (4 * CHAR_BIT) 48 49#define TARG_INT_MAX ((int32_t) (((uint32_t) -1) >> 1)) 50#define TARG_INT_MIN ((-TARG_INT_MAX) - 1) 51#define TARG_UINT_MAX ((uint32_t) -1) 52 53#define TARG_LONG_MAX TARG_INT_MAX 54#define TARG_LONG_MIN TARG_INT_MIN 55#define TARG_ULONG_MAX TARG_UINT_MAX 56 57#define TARG_QUAD_MAX ((int64_t) (((uint64_t) -1) >> 1)) 58#define TARG_QUAD_MIN ((-TARG_QUAD_MAX) - 1) 59#define TARG_UQUAD_MAX ((uint64_t) -1) 60