blob: 4f494859f488616a166e9e52b7be3161e7f3ccd7 [file] [log] [blame]
Antonio Nino Diaz6ef16122018-08-15 19:51:09 +01001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#define INT8_MAX 0x7F
8#define INT8_MIN (-INT8_MAX - 1)
9#define UINT8_MAX 0xFFU
10
11#define INT16_MAX 0x7FFF
12#define INT16_MIN (-INT16_MAX - 1)
13#define UINT16_MAX 0xFFFFU
14
15#define INT32_MAX 0x7FFFFFFF
16#define INT32_MIN (-INT32_MAX - 1)
17#define UINT32_MAX 0xFFFFFFFFU
18
19#define INT64_MAX 0x7FFFFFFFFFFFFFFFLL
20#define INT64_MIN (-INT64_MAX - 1LL)
21#define UINT64_MAX 0xFFFFFFFFFFFFFFFFULL
22
23#define INT_LEAST8_MIN INT8_MIN
24#define INT_LEAST8_MAX INT8_MAX
25#define UINT_LEAST8_MAX UINT8_MAX
26
27#define INT_LEAST16_MIN INT16_MIN
28#define INT_LEAST16_MAX INT16_MAX
29#define UINT_LEAST16_MAX UINT16_MAX
30
31#define INT_LEAST32_MIN INT32_MIN
32#define INT_LEAST32_MAX INT32_MAX
33#define UINT_LEAST32_MAX UINT32_MAX
34
35#define INT_LEAST64_MIN INT64_MIN
36#define INT_LEAST64_MAX INT64_MAX
37#define UINT_LEAST64_MAX UINT64_MAX
38
39#define INT_FAST8_MIN INT32_MIN
40#define INT_FAST8_MAX INT32_MAX
41#define UINT_FAST8_MAX UINT32_MAX
42
43#define INT_FAST16_MIN INT32_MIN
44#define INT_FAST16_MAX INT32_MAX
45#define UINT_FAST16_MAX UINT32_MAX
46
47#define INT_FAST32_MIN INT32_MIN
48#define INT_FAST32_MAX INT32_MAX
49#define UINT_FAST32_MAX UINT32_MAX
50
51#define INT_FAST64_MIN INT64_MIN
52#define INT_FAST64_MAX INT64_MAX
53#define UINT_FAST64_MAX UINT64_MAX
54
55#define INTPTR_MIN INT32_MIN
56#define INTPTR_MAX INT32_MAX
57#define UINTPTR_MAX UINT32_MAX
58
59#define INTMAX_MIN INT64_MIN
60#define INTMAX_MAX INT64_MAX
61#define UINTMAX_MAX UINT64_MAX
62
63#define PTRDIFF_MIN INT32_MIN
64#define PTRDIFF_MAX INT32_MAX
65
66#define SIZE_MAX UINT32_MAX
67
68#define INT8_C(x) x
69#define INT16_C(x) x
70#define INT32_C(x) x
71#define INT64_C(x) x ## LL
72
73#define UINT8_C(x) x
74#define UINT16_C(x) x
75#define UINT32_C(x) x ## U
76#define UINT64_C(x) x ## ULL
77
78#define INTMAX_C(x) x ## LL
79#define UINTMAX_C(x) x ## ULL
80
81typedef signed char int8_t;
82typedef short int16_t;
83typedef int int32_t;
84typedef long long int64_t;
85
86typedef unsigned char uint8_t;
87typedef unsigned short uint16_t;
88typedef unsigned int uint32_t;
89typedef unsigned long long uint64_t;
90
91typedef signed char int8_least_t;
92typedef short int16_least_t;
93typedef int int32_least_t;
94typedef long long int64_least_t;
95
96typedef unsigned char uint8_least_t;
97typedef unsigned short uint16_least_t;
98typedef unsigned int uint32_least_t;
99typedef unsigned long long uint64_least_t;
100
101typedef int int8_fast_t;
102typedef int int16_fast_t;
103typedef int int32_fast_t;
104typedef long long int64_fast_t;
105
106typedef unsigned int uint8_fast_t;
107typedef unsigned int uint16_fast_t;
108typedef unsigned int uint32_fast_t;
109typedef unsigned long long uint64_fast_t;
110
111typedef long intptr_t;
112typedef unsigned long uintptr_t;
113
114typedef long long intmax_t;
115typedef unsigned long long uintmax_t;
116
117typedef long register_t;
118typedef unsigned long u_register_t;