riscv.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifndef BHO_PREDEF_ARCHITECTURE_RISCV_H
  8. #define BHO_PREDEF_ARCHITECTURE_RISCV_H
  9. #include <asio2/bho/predef/version_number.h>
  10. #include <asio2/bho/predef/make.h>
  11. /* tag::reference[]
  12. = `BHO_ARCH_RISCV`
  13. http://en.wikipedia.org/wiki/RISC-V[RISC-V] architecture.
  14. [options="header"]
  15. |===
  16. | {predef_symbol} | {predef_version}
  17. | `+__riscv+` | {predef_detection}
  18. |===
  19. */ // end::reference[]
  20. #define BHO_ARCH_RISCV BHO_VERSION_NUMBER_NOT_AVAILABLE
  21. #if defined(__riscv)
  22. # undef BHO_ARCH_RISCV
  23. # define BHO_ARCH_RISCV BHO_VERSION_NUMBER_AVAILABLE
  24. #endif
  25. #if BHO_ARCH_RISCV
  26. # define BHO_ARCH_RISCV_AVAILABLE
  27. #endif
  28. #if BHO_ARCH_RISCV
  29. # undef BHO_ARCH_WORD_BITS_32
  30. # define BHO_ARCH_WORD_BITS_32 BHO_VERSION_NUMBER_AVAILABLE
  31. #endif
  32. #define BHO_ARCH_RISCV_NAME "RISC-V"
  33. #endif
  34. #include <asio2/bho/predef/detail/test.h>
  35. BHO_PREDEF_DECLARE_TEST(BHO_ARCH_RISCV,BHO_ARCH_RISCV_NAME)