blob: 24562cde9b80da1450e7f41bcc2cff688a414a9f [file] [log] [blame]
Ronald G. Minniche0e784a2014-11-26 19:25:47 +00001#ifndef RISCV_STDINT_H
2#define RISCV_STDINT_H
3
4/* Exact integral types */
5typedef unsigned char uint8_t;
6typedef signed char int8_t;
7
8typedef unsigned short uint16_t;
9typedef signed short int16_t;
10
11typedef unsigned int uint32_t;
12typedef signed int int32_t;
13
14typedef unsigned long long uint64_t;
15typedef signed long long int64_t;
16
17/* Small types */
18typedef unsigned char uint_least8_t;
19typedef signed char int_least8_t;
20
21typedef unsigned short uint_least16_t;
22typedef signed short int_least16_t;
23
24typedef unsigned int uint_least32_t;
25typedef signed int int_least32_t;
26
27typedef unsigned long long uint_least64_t;
28typedef signed long long int_least64_t;
29
30/* Fast Types */
31typedef unsigned char uint_fast8_t;
32typedef signed char int_fast8_t;
33
34typedef unsigned int uint_fast16_t;
35typedef signed int int_fast16_t;
36
37typedef unsigned int uint_fast32_t;
38typedef signed int int_fast32_t;
39
40typedef unsigned long long uint_fast64_t;
41typedef signed long long int_fast64_t;
42
43typedef long long int intmax_t;
44typedef unsigned long long uintmax_t;
45
46typedef uint8_t u8;
47typedef uint16_t u16;
48typedef uint32_t u32;
49typedef uint64_t u64;
50typedef int8_t s8;
51typedef int16_t s16;
52typedef int32_t s32;
53typedef int64_t s64;
54
Alexandru Gagniuca5839242015-01-25 20:46:55 -060055typedef uint8_t bool;
56#define true 1
57#define false 0
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000058
59/* Types for `void *' pointers. */
60typedef s64 intptr_t;
61typedef u64 uintptr_t;
62
63#endif /* RISCV_STDINT_H */