]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - include/cgen/basic-modes.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / include / cgen / basic-modes.h
1 /* Basic CGEN modes.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
3 Contributed by Red Hat.
4
5 This file is part of the GNU opcodes library.
6
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 It is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this library; see the file COPYING3. If not, write to the
19 Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
21
22 #ifndef CGEN_BASIC_MODES_H
23 #define CGEN_BASIC_MODES_H
24
25 /* This file doesn't contain all modes,
26 just the basic/portable ones.
27 It also provides access to stdint.h (*1) so the includer doesn't have
28 to deal with the portability issues.
29 (*1): To the extent that bfd_stdint.h does for now. */
30
31 /* IWBN to avoid unnecessary dependencies on bfd-anything. */
32 #include "bfd_stdint.h"
33
34 typedef int8_t QI;
35 typedef uint8_t UQI;
36
37 typedef int16_t HI;
38 typedef uint16_t UHI;
39
40 typedef int32_t SI;
41 typedef uint32_t USI;
42
43 typedef int64_t DI;
44 typedef uint64_t UDI;
45
46 typedef int INT;
47 typedef unsigned int UINT;
48
49 /* Cover macro to create a 64-bit integer. */
50 #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
51
52 #endif /* CGEN_BASIC_MODES_H */