1 /* This file is part of psim (model of the PowerPC(tm) architecture)
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
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 3 of
8 the License, or (at your option) any later version.
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.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 PowerPC is a trademark of International Business Machines Corporation. */
23 /* Basic type sizes for the PowerPC */
30 natural* sign determined by host
31 signed* signed type of the given size
32 unsigned* The corresponding insigned type
36 *NN Size based on the number of bits
37 *_NN Size according to the number of bytes
38 *_word Size based on the target architecture's word
39 word size (32/64 bits)
40 *_cell Size based on the target architecture's
41 IEEE 1275 cell size (almost always 32 bits)
51 typedef char natural8
;
52 typedef short natural16
;
53 typedef int natural32
;
55 typedef signed char signed8
;
56 typedef signed short signed16
;
57 typedef signed int signed32
;
59 typedef unsigned char unsigned8
;
60 typedef unsigned short unsigned16
;
61 typedef unsigned int unsigned32
;
64 typedef long long natural64
;
65 typedef signed long long signed64
;
66 typedef unsigned long long unsigned64
;
70 typedef __int64 natural64
;
71 typedef signed __int64 signed64
;
72 typedef unsigned __int64 unsigned64
;
77 typedef natural8 natural_1
;
78 typedef natural16 natural_2
;
79 typedef natural32 natural_4
;
80 typedef natural64 natural_8
;
82 typedef signed8 signed_1
;
83 typedef signed16 signed_2
;
84 typedef signed32 signed_4
;
85 typedef signed64 signed_8
;
87 typedef unsigned8 unsigned_1
;
88 typedef unsigned16 unsigned_2
;
89 typedef unsigned32 unsigned_4
;
90 typedef unsigned64 unsigned_8
;
93 /* for general work, the following are defined */
94 /* unsigned: >= 32 bits */
95 /* signed: >= 32 bits */
96 /* long: >= 32 bits, sign undefined */
97 /* int: small indicator */
99 /* target architecture based */
100 #if (WITH_TARGET_WORD_BITSIZE == 64)
101 typedef natural64 natural_word
;
102 typedef unsigned64 unsigned_word
;
103 typedef signed64 signed_word
;
105 typedef natural32 natural_word
;
106 typedef unsigned32 unsigned_word
;
107 typedef signed32 signed_word
;
111 /* Other instructions */
112 typedef unsigned32 instruction_word
;
114 /* IEEE 1275 cell size - only support 32bit mode at present */
115 typedef natural32 natural_cell
;
116 typedef unsigned32 unsigned_cell
;
117 typedef signed32 signed_cell
;
119 #endif /* _WORDS_H_ */