aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-29 15:37:28 +0200
committerBad Diode <bd@badd10de.dev>2021-10-29 15:37:28 +0200
commite73a4c16a2269cdb2f5e7d66fb9839e4c44e14de (patch)
treec44721b005b7a0623e7acc7103ca8e21a25ff422 /src/common.h
parentfcc131afdd029c606ea39f3557bc3d33a075b1de (diff)
downloadbdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.tar.gz
bdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.zip
Prepare third compiler implementation
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..08e78a8
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,31 @@
1#ifndef BDL_COMMON_H
2#define BDL_COMMON_H
3
4#include <assert.h>
5#include <stdbool.h>
6#include <stddef.h>
7#include <stdint.h>
8
9typedef uint8_t u8;
10typedef uint16_t u16;
11typedef uint32_t u32;
12typedef uint64_t u64;
13typedef int8_t s8;
14typedef int16_t s16;
15typedef int32_t s32;
16typedef int64_t s64;
17typedef volatile u8 vu8;
18typedef volatile u16 vu16;
19typedef volatile u32 vu32;
20typedef volatile u64 vu64;
21typedef volatile s8 vs8;
22typedef volatile s16 vs16;
23typedef volatile s32 vs32;
24typedef volatile s64 vs64;
25
26#define KB(N) ((u64)(N) * 1024)
27#define MB(N) ((u64)KB(N) * 1024)
28#define GB(N) ((u64)MB(N) * 1024)
29#define TB(N) ((u64)GB(N) * 1024)
30
31#endif // BDL_COMMON_H