blob: 446a1367e9aa5daf973ca95b240ea6b696ddca60 [file] [log] [blame]
Martin Roth8e442dc2016-01-12 09:52:36 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000014#ifndef RISCV_STDINT_H
15#define RISCV_STDINT_H
16
17/* Exact integral types */
18typedef unsigned char uint8_t;
19typedef signed char int8_t;
20
21typedef unsigned short uint16_t;
22typedef signed short int16_t;
23
24typedef unsigned int uint32_t;
25typedef signed int int32_t;
26
27typedef unsigned long long uint64_t;
28typedef signed long long int64_t;
29
30/* Small types */
31typedef unsigned char uint_least8_t;
32typedef signed char int_least8_t;
33
34typedef unsigned short uint_least16_t;
35typedef signed short int_least16_t;
36
37typedef unsigned int uint_least32_t;
38typedef signed int int_least32_t;
39
40typedef unsigned long long uint_least64_t;
41typedef signed long long int_least64_t;
42
43/* Fast Types */
44typedef unsigned char uint_fast8_t;
45typedef signed char int_fast8_t;
46
47typedef unsigned int uint_fast16_t;
48typedef signed int int_fast16_t;
49
50typedef unsigned int uint_fast32_t;
51typedef signed int int_fast32_t;
52
53typedef unsigned long long uint_fast64_t;
54typedef signed long long int_fast64_t;
55
56typedef long long int intmax_t;
57typedef unsigned long long uintmax_t;
58
59typedef uint8_t u8;
60typedef uint16_t u16;
61typedef uint32_t u32;
62typedef uint64_t u64;
63typedef int8_t s8;
64typedef int16_t s16;
65typedef int32_t s32;
66typedef int64_t s64;
67
Alexandru Gagniuca5839242015-01-25 20:46:55 -060068typedef uint8_t bool;
69#define true 1
70#define false 0
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000071
72/* Types for `void *' pointers. */
73typedef s64 intptr_t;
74typedef u64 uintptr_t;
75
76#endif /* RISCV_STDINT_H */