* common/aclocal.m4: Add include of ../../config/zlib.m4.
[deliverable/binutils-gdb.git] / sim / ppc / words.h
CommitLineData
c906108c
SS
1/* This file is part of psim (model of the PowerPC(tm) architecture)
2
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License
7 as published by the Free Software Foundation; either version 2 of
8 the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 --
20
21 PowerPC is a trademark of International Business Machines Corporation. */
22
23
24/* Basic type sizes for the PowerPC */
25
26#ifndef _WORDS_H_
27#define _WORDS_H_
28
29/* TYPES:
30
31 natural* sign determined by host
32 signed* signed type of the given size
33 unsigned* The corresponding insigned type
34
35 SIZES
36
37 *NN Size based on the number of bits
38 *_NN Size according to the number of bytes
39 *_word Size based on the target architecture's word
40 word size (32/64 bits)
41 *_cell Size based on the target architecture's
42 IEEE 1275 cell size (almost always 32 bits)
43
44*/
45
46
30e66173
MI
47#ifdef HAVE_CONFIG_H
48#include "config.h"
49#endif
50
c906108c
SS
51/* bit based */
52typedef char natural8;
53typedef short natural16;
e8a15d32 54typedef int natural32;
c906108c
SS
55
56typedef signed char signed8;
57typedef signed short signed16;
0b06d9f4 58typedef signed int signed32;
c906108c
SS
59
60typedef unsigned char unsigned8;
61typedef unsigned short unsigned16;
0b06d9f4 62typedef unsigned int unsigned32;
c906108c
SS
63
64#ifdef __GNUC__
65typedef long long natural64;
66typedef signed long long signed64;
67typedef unsigned long long unsigned64;
68#endif
69
70#ifdef _MSC_VER
71typedef __int64 natural64;
72typedef signed __int64 signed64;
73typedef unsigned __int64 unsigned64;
74#endif
75
76
77/* byte based */
78typedef natural8 natural_1;
79typedef natural16 natural_2;
80typedef natural32 natural_4;
81typedef natural64 natural_8;
82
83typedef signed8 signed_1;
84typedef signed16 signed_2;
85typedef signed32 signed_4;
86typedef signed64 signed_8;
87
88typedef unsigned8 unsigned_1;
89typedef unsigned16 unsigned_2;
90typedef unsigned32 unsigned_4;
91typedef unsigned64 unsigned_8;
92
93
94/* for general work, the following are defined */
95/* unsigned: >= 32 bits */
96/* signed: >= 32 bits */
97/* long: >= 32 bits, sign undefined */
98/* int: small indicator */
99
100/* target architecture based */
101#if (WITH_TARGET_WORD_BITSIZE == 64)
102typedef natural64 natural_word;
103typedef unsigned64 unsigned_word;
104typedef signed64 signed_word;
105#else
106typedef natural32 natural_word;
107typedef unsigned32 unsigned_word;
108typedef signed32 signed_word;
109#endif
110
111
112/* Other instructions */
113typedef unsigned32 instruction_word;
114
115/* IEEE 1275 cell size - only support 32bit mode at present */
116typedef natural32 natural_cell;
117typedef unsigned32 unsigned_cell;
118typedef signed32 signed_cell;
119
120#endif /* _WORDS_H_ */
This page took 0.422987 seconds and 4 git commands to generate.