]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | /* |
2 | Copyright Andreas Schwab 2019 | |
3 | Distributed under the Boost Software License, Version 1.0. | |
4 | (See accompanying file LICENSE_1_0.txt or copy at | |
5 | http://www.boost.org/LICENSE_1_0.txt) | |
6 | */ | |
7 | ||
8 | #ifndef BOOST_PREDEF_ARCHITECTURE_RISCV_H | |
9 | #define BOOST_PREDEF_ARCHITECTURE_RISCV_H | |
10 | ||
11 | #include <boost/predef/version_number.h> | |
12 | #include <boost/predef/make.h> | |
13 | ||
14 | /* tag::reference[] | |
15 | = `BOOST_ARCH_RISCV` | |
16 | ||
17 | http://en.wikipedia.org/wiki/RISC-V[RISC-V] architecture. | |
18 | ||
19 | [options="header"] | |
20 | |=== | |
21 | | {predef_symbol} | {predef_version} | |
22 | ||
23 | | `+__riscv+` | {predef_detection} | |
24 | |=== | |
25 | */ // end::reference[] | |
26 | ||
27 | #define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_NOT_AVAILABLE | |
28 | ||
29 | #if defined(__riscv) | |
30 | # undef BOOST_ARCH_RISCV | |
31 | # define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_AVAILABLE | |
32 | #endif | |
33 | ||
34 | #if BOOST_ARCH_RISCV | |
35 | # define BOOST_ARCH_RISCV_AVAILABLE | |
36 | #endif | |
37 | ||
1e59de90 TL |
38 | #if BOOST_ARCH_RISCV |
39 | # undef BOOST_ARCH_WORD_BITS_32 | |
40 | # define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE | |
41 | #endif | |
42 | ||
f67539c2 TL |
43 | #define BOOST_ARCH_RISCV_NAME "RISC-V" |
44 | ||
45 | #endif | |
46 | ||
47 | #include <boost/predef/detail/test.h> | |
48 | BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RISCV,BOOST_ARCH_RISCV_NAME) |