targparam.h revision 212513
191586Smarkm/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:20 thorpej Exp $ */ 291586Smarkm 391586Smarkm/* 491586Smarkm * Copyright (c) 1994, 1995 Jochen Pohl 591586Smarkm * All Rights Reserved. 691586Smarkm * 791586Smarkm * Redistribution and use in source and binary forms, with or without 891586Smarkm * modification, are permitted provided that the following conditions 991586Smarkm * are met: 1091586Smarkm * 1. Redistributions of source code must retain the above copyright 1191586Smarkm * notice, this list of conditions and the following disclaimer. 1291586Smarkm * 2. Redistributions in binary form must reproduce the above copyright 1391586Smarkm * notice, this list of conditions and the following disclaimer in the 1491586Smarkm * documentation and/or other materials provided with the distribution. 1591586Smarkm * 3. All advertising materials mentioning features or use of this software 1691586Smarkm * must display the following acknowledgement: 1791586Smarkm * This product includes software developed by Jochen Pohl for 1891586Smarkm * The NetBSD Project. 1991586Smarkm * 4. The name of the author may not be used to endorse or promote products 2091586Smarkm * derived from this software without specific prior written permission. 2191586Smarkm * 2291586Smarkm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2391586Smarkm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2491586Smarkm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2591586Smarkm * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2691586Smarkm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2791586Smarkm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2891586Smarkm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2991586Smarkm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3091586Smarkm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3191586Smarkm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32212513Simp * 33212513Simp * $FreeBSD: head/usr.bin/xlint/arch/powerpc/targparam.h 212513 2010-09-13 01:20:53Z imp $ 3491586Smarkm */ 3591586Smarkm 3691586Smarkm/* 3791586Smarkm * Machine-dependent target parameters for lint1. 3891586Smarkm */ 3991586Smarkm 40212513Simp#ifdef __powerpc64__ 41212513Simp#include "lp64.h" 42212513Simp#else 4391586Smarkm#include "ilp32.h" 44212513Simp#endif 4591586Smarkm 4691586Smarkm/* 4791586Smarkm * Should be set to 1 if the difference of two pointers is of type long 4891586Smarkm * or the value of sizeof is of type unsigned long. Note this MUST be 4991586Smarkm * kept in sync with the compiler! 5091586Smarkm */ 5191586Smarkm 52212513Simp#ifdef __powerpc64__ 53212513Simp#define PTRDIFF_IS_LONG 1 54212513Simp#define SIZEOF_IS_ULONG 1 55212513Simp#else 5691586Smarkm#define PTRDIFF_IS_LONG 0 5791586Smarkm#define SIZEOF_IS_ULONG 0 58212513Simp#endif 5991586Smarkm 6091586Smarkm#define FLOAT_SIZE (4 * CHAR_BIT) 6191586Smarkm#define DOUBLE_SIZE (8 * CHAR_BIT) 6291586Smarkm#define LDOUBLE_SIZE (8 * CHAR_BIT) 6391586Smarkm 6491586Smarkm#define ENUM_SIZE (4 * CHAR_BIT) 65