1139825Simp/*	$NetBSD: targparam.h,v 1.1 2002/01/18 20:39:19 thorpej Exp $	*/
2116964Sgrehan
3116964Sgrehan/*
4116964Sgrehan * Copyright (c) 1994, 1995 Jochen Pohl
5116964Sgrehan * All Rights Reserved.
6116964Sgrehan *
7116964Sgrehan * Redistribution and use in source and binary forms, with or without
8116964Sgrehan * modification, are permitted provided that the following conditions
9116964Sgrehan * are met:
10116964Sgrehan * 1. Redistributions of source code must retain the above copyright
11116964Sgrehan *    notice, this list of conditions and the following disclaimer.
12116964Sgrehan * 2. Redistributions in binary form must reproduce the above copyright
13116964Sgrehan *    notice, this list of conditions and the following disclaimer in the
14116964Sgrehan *    documentation and/or other materials provided with the distribution.
15116964Sgrehan * 3. All advertising materials mentioning features or use of this software
16116964Sgrehan *    must display the following acknowledgement:
17116964Sgrehan *	This product includes software developed by Jochen Pohl for
18116964Sgrehan *	The NetBSD Project.
19116964Sgrehan * 4. The name of the author may not be used to endorse or promote products
20116964Sgrehan *    derived from this software without specific prior written permission.
21116964Sgrehan *
22116964Sgrehan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23116964Sgrehan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24116964Sgrehan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25116964Sgrehan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26116964Sgrehan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27116964Sgrehan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28227843Smarius * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29227843Smarius * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30227843Smarius * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31116964Sgrehan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32116964Sgrehan */
33131102Sgrehan
34116964Sgrehan/*
35116964Sgrehan * Machine-dependent target parameters for lint1.
36116964Sgrehan */
37266019Sian
38116964Sgrehan#include "ilp32.h"
39116964Sgrehan
40116964Sgrehan/*
41183882Snwhitehorn * Should be set to 1 if the difference of two pointers is of type long
42186128Snwhitehorn * or the value of sizeof is of type unsigned long.  Note this MUST be
43116964Sgrehan * kept in sync with the compiler!
44116964Sgrehan */
45116964Sgrehan
46116964Sgrehan#if defined(TARGET_OBJFMT_ELF)
47116964Sgrehan#define	PTRDIFF_IS_LONG		1
48209298Snwhitehorn#define	SIZEOF_IS_ULONG		1
49116964Sgrehan#else
50174782Smarcel#define	PTRDIFF_IS_LONG		0
51116964Sgrehan#define	SIZEOF_IS_ULONG		0
52116964Sgrehan#endif
53116964Sgrehan
54116964Sgrehan#define	FLOAT_SIZE		(4 * CHAR_BIT)
55230993Snwhitehorn#define	DOUBLE_SIZE		(8 * CHAR_BIT)
56116964Sgrehan#define	LDOUBLE_SIZE		(8 * CHAR_BIT)
57116964Sgrehan
58116964Sgrehan#if defined(TARGET_OBJFMT_ELF)
59116964Sgrehan/* XXX ARM ELF ABI says packed enums -- variable size! */
60116964Sgrehan#define	ENUM_SIZE		(4 * CHAR_BIT)
61116964Sgrehan#else
62116964Sgrehan#define	ENUM_SIZE		(4 * CHAR_BIT)
63116964Sgrehan#endif
64116964Sgrehan