core_feature_bitmanip.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (c) 2019 Nuclei Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the License); you may
  7. * not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  14. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. #ifndef __CORE_FEATURE_BITMANIP__
  19. #define __CORE_FEATURE_BITMANIP__
  20. /*!
  21. * @file core_feature_bitmanip.h
  22. * @brief Bitmanipulation feature API header file for Nuclei N/NX Core
  23. */
  24. /*
  25. * Bitmanipulation Feature Configuration Macro:
  26. * 1. __BITMANIP_PRESENT: Define whether Bitmanipulation Unit is present or not
  27. * * 0: Not present
  28. * * 1: Present
  29. */
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #include "core_feature_base.h"
  34. #if defined(__BITMANIP_PRESENT) && (__BITMANIP_PRESENT == 1)
  35. /* ########################### CPU Bitmanipulation Intrinsic Functions ########################### */
  36. /**
  37. * \defgroup NMSIS_Core_Bitmanip_Intrinsic Intrinsic Functions for Bitmanipulation Instructions
  38. * \ingroup NMSIS_Core
  39. * \brief Functions that generate RISC-V Bitmanipulation instructions.
  40. * \details
  41. *
  42. * RISC-V Bitmanipulation Intrinsic APIs are provided directly through compiler generated intrinsic function.
  43. *
  44. * This intrinsic function support in compiler is introduced in nuclei riscv gcc 10.2.
  45. *
  46. * API header file can be found in lib/gcc/riscv-nuclei-elf/<gcc_ver>/include/rvintrin.h
  47. *
  48. * For Nuclei GCC 13/Clang 17 and later version, this intrinsic header no longer existed, please take care.
  49. *
  50. * @{
  51. */
  52. /** @} */ /* End of Doxygen Group NMSIS_Core_Bitmanip_Intrinsic */
  53. #if defined(__INC_INTRINSIC_API) && (__INC_INTRINSIC_API == 1)
  54. // deleted in gcc13, you can directly use b extension intrinisc api
  55. //#include <rvintrin.h>
  56. #endif
  57. #endif /* defined(__BITMANIP_PRESENT) && (__BITMANIP_PRESENT == 1) */
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __CORE_FEATURE_BITMANIP__ */