-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patharchitecture.hpp
78 lines (55 loc) · 1.86 KB
/
architecture.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
* @file architecture.hpp
* @brief
* @date 2020-07-14
* @author Peter
* @copyright
* Peter of [ThinkSpirit Laboratory](http://thinkspirit.org/)
* of [Nanjing University of Information Science & Technology](http://www.nuist.edu.cn/)
* all rights reserved
*/
#ifndef KERBAL_CONFIG_ARCHITECTURE_HPP
#define KERBAL_CONFIG_ARCHITECTURE_HPP
#include <kerbal/config/compiler_id.hpp>
#ifndef KERBAL_ARCHITECTURE_UNKNOWN
# define KERBAL_ARCHITECTURE_UNKNOWN -1
#endif
#ifndef KERBAL_ARCHITECTURE_X86
# define KERBAL_ARCHITECTURE_X86 0
#endif
#ifndef KERBAL_ARCHITECTURE_AMD64
# define KERBAL_ARCHITECTURE_AMD64 1
#endif
#ifndef KERBAL_ARCHITECTURE_ARM
# define KERBAL_ARCHITECTURE_ARM 2
#endif
#ifndef KERBAL_ARCHITECTURE_AARCH64
# define KERBAL_ARCHITECTURE_AARCH64 3
#endif
#ifndef KERBAL_ARCHITECTURE_WASM
# define KERBAL_ARCHITECTURE_WASM 4
#endif
#ifndef KERBAL_ARCHITECTURE_RISCV
# define KERBAL_ARCHITECTURE_RISCV 5
#endif
#ifndef KERBAL_ARCHITECTURE_LOONGARCH64
# define KERBAL_ARCHITECTURE_LOONGARCH64 6
#endif
#ifndef KERBAL_ARCHITECTURE
# include <kerbal/config/detail/architecture/_0_x86.part.hpp>
# include <kerbal/config/detail/architecture/_1_amd64.part.hpp>
# include <kerbal/config/detail/architecture/_2_arm.part.hpp>
# include <kerbal/config/detail/architecture/_3_aarch64.part.hpp>
# include <kerbal/config/detail/architecture/_4_wasm.part.hpp>
# include <kerbal/config/detail/architecture/_5_riscv.part.hpp>
# include <kerbal/config/detail/architecture/_6_loongarch64.part.hpp>
# ifndef KERBAL_ARCHITECTURE
# define KERBAL_ARCHITECTURE KERBAL_ARCHITECTURE_UNKNOWN
# if KERBAL_COMPILER_ID == KERBAL_COMPILER_ID_MSVC
# pragma message ("Kerbal Warning: " "Unknown architecture")
# else
# warning "Kerbal Warning: " "Unknown architecture"
# endif
# endif
#endif // ifndef KERBAL_ARCHITECTURE
#endif // KERBAL_CONFIG_ARCHITECTURE_HPP