loongarch.h 942 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. Copyright Zhang Na 2022
  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_LOONGARCH_H
  8. #define BHO_PREDEF_ARCHITECTURE_LOONGARCH_H
  9. #include <asio2/bho/predef/version_number.h>
  10. #include <asio2/bho/predef/make.h>
  11. /* tag::reference[]
  12. = `BHO_ARCH_LOONGARCH`
  13. [options="header"]
  14. |===
  15. | {predef_symbol} | {predef_version}
  16. | `+__loongarch__+` | {predef_detection}
  17. |===
  18. */ // end::reference[]
  19. #define BHO_ARCH_LOONGARCH BHO_VERSION_NUMBER_NOT_AVAILABLE
  20. #if defined(__loongarch__)
  21. # undef BHO_ARCH_LOONGARCH
  22. # define BHO_ARCH_LOONGARCH BHO_VERSION_NUMBER_AVAILABLE
  23. #endif
  24. #if BHO_ARCH_LOONGARCH
  25. # define BHO_ARCH_LOONGARCH_AVAILABLE
  26. #endif
  27. #define BHO_ARCH_LOONGARCH_NAME "LoongArch"
  28. #endif
  29. #include <asio2/bho/predef/detail/test.h>
  30. BHO_PREDEF_DECLARE_TEST(BHO_ARCH_LOONGARCH,BHO_ARCH_LOONGARCH_NAME)