]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/ppc/words.h
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / sim / ppc / words.h
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
42 */
43
44
45 /* bit based */
46 typedef char natural8;
47 typedef short natural16;
48 typedef long natural32;
49 typedef long long natural64;
50
51 typedef signed char signed8;
52 typedef signed short signed16;
53 typedef signed long signed32;
54 typedef signed long long signed64;
55
56 typedef unsigned char unsigned8;
57 typedef unsigned short unsigned16;
58 typedef unsigned long unsigned32;
59 typedef unsigned long long unsigned64;
60
61
62 /* byte based */
63 typedef natural8 natural_1;
64 typedef natural16 natural_2;
65 typedef natural32 natural_4;
66 typedef natural64 natural_8;
67
68 typedef signed8 signed_1;
69 typedef signed16 signed_2;
70 typedef signed32 signed_4;
71 typedef signed64 signed_8;
72
73 typedef unsigned8 unsigned_1;
74 typedef unsigned16 unsigned_2;
75 typedef unsigned32 unsigned_4;
76 typedef unsigned64 unsigned_8;
77
78
79 /* for general work, the following are defined */
80 /* unsigned: >= 32 bits */
81 /* signed: >= 32 bits */
82 /* long: >= 32 bits, sign undefined */
83 /* int: small indicator */
84
85 /* target architecture based */
86 #if (WITH_64BIT_TARGET)
87 typedef natural64 natural_word;
88 typedef unsigned64 unsigned_word;
89 typedef signed64 signed_word;
90 #else
91 typedef natural32 natural_word;
92 typedef unsigned32 unsigned_word;
93 typedef signed32 signed_word;
94 #endif
95
96
97 /* Other instructions */
98 typedef unsigned32 instruction_word;
99
100 #endif /* _WORDS_H_ */