]> Git Repo - binutils.git/blob - sim/ppc/words.h
Automatic date update in version.in
[binutils.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 <[email protected]>
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 3 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, see <http://www.gnu.org/licenses/>.
17  
18    --
19
20    PowerPC is a trademark of International Business Machines Corporation. */
21
22
23 /* Basic type sizes for the PowerPC */
24
25 #ifndef _WORDS_H_
26 #define _WORDS_H_
27
28 /* TYPES:
29
30      intNN_t    Signed type of the given bit size
31      uintNN_t   The corresponding unsigned type
32
33    SIZES
34
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)
41
42 */
43
44
45 /* This must come before any other includes.  */
46 #include "defs.h"
47
48 #include <stdint.h>
49
50 /* byte based */
51 typedef int8_t signed_1;
52 typedef int16_t signed_2;
53 typedef int32_t signed_4;
54 typedef int64_t signed_8;
55
56 typedef uint8_t unsigned_1;
57 typedef uint16_t unsigned_2;
58 typedef uint32_t unsigned_4;
59 typedef uint64_t unsigned_8;
60
61
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 */
67
68 /* target architecture based */
69 #if (WITH_TARGET_WORD_BITSIZE == 64)
70 typedef uint64_t unsigned_word;
71 typedef int64_t signed_word;
72 #else
73 typedef uint32_t unsigned_word;
74 typedef int32_t signed_word;
75 #endif
76
77
78 /* Other instructions */
79 typedef uint32_t instruction_word;
80
81 /* IEEE 1275 cell size - only support 32bit mode at present */
82 typedef uint32_t unsigned_cell;
83 typedef int32_t signed_cell;
84
85 #endif /* _WORDS_H_ */
This page took 0.026682 seconds and 4 git commands to generate.