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 intNN_t Signed type of the given bit size
31 uintNN_t The corresponding unsigned type
35 *NN Size based on the number of bits
36 *_NN Size according to the number of bytes
37 *_word Size based on the target architecture's word
38 word size (32/64 bits)
39 *_cell Size based on the target architecture's
40 IEEE 1275 cell size (almost always 32 bits)
45 /* This must come before any other includes. */
51 typedef int8_t signed_1
;
52 typedef int16_t signed_2
;
53 typedef int32_t signed_4
;
54 typedef int64_t signed_8
;
56 typedef uint8_t unsigned_1
;
57 typedef uint16_t unsigned_2
;
58 typedef uint32_t unsigned_4
;
59 typedef uint64_t unsigned_8
;
62 /* for general work, the following are defined */
63 /* unsigned: >= 32 bits */
64 /* signed: >= 32 bits */
65 /* long: >= 32 bits, sign undefined */
66 /* int: small indicator */
68 /* target architecture based */
69 #if (WITH_TARGET_WORD_BITSIZE == 64)
70 typedef uint64_t unsigned_word
;
71 typedef int64_t signed_word
;
73 typedef uint32_t unsigned_word
;
74 typedef int32_t signed_word
;
78 /* Other instructions */
79 typedef uint32_t instruction_word
;
81 /* IEEE 1275 cell size - only support 32bit mode at present */
82 typedef uint32_t unsigned_cell
;
83 typedef int32_t signed_cell
;
85 #endif /* _WORDS_H_ */