diff options
| author | Bernard Xiong <[email protected]> | 2024-07-25 19:03:37 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-25 19:03:37 +0800 |
| commit | bde4817b9e46bf0b1c2b9bac476c01d02b88618a (patch) | |
| tree | ea9a1db53c1050069327efb83ddb3743cb9e2cb2 /libcpu/aarch64/common/include | |
| parent | 30f995dfb4b915031d79e94ac41d2789d14cc97d (diff) | |
| parent | 1202d51bd64c4a1d442e708eba42d88c1c086016 (diff) | |
Merge pull request #9228 from messigogogo/master
[BSP/Phytium]适配最新驱动
Diffstat (limited to 'libcpu/aarch64/common/include')
| -rw-r--r-- | libcpu/aarch64/common/include/cpuport.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/libcpu/aarch64/common/include/cpuport.h b/libcpu/aarch64/common/include/cpuport.h index 58fe3b145f..e5e256b57b 100644 --- a/libcpu/aarch64/common/include/cpuport.h +++ b/libcpu/aarch64/common/include/cpuport.h @@ -53,36 +53,6 @@ typedef struct void _thread_start(void); -#ifdef RT_USING_CPU_FFS -/** - * This function finds the first bit set (beginning with the least significant bit) - * in value and return the index of that bit. - * - * Bits are numbered starting at 1 (the least significant bit). A return value of - * zero from any of these functions means that the argument was zero. - * - * @return return the index of the first bit set. If value is 0, then this function - * shall return 0. - */ -rt_inline int __rt_ffs(int value) -{ -#ifdef __GNUC__ - return __builtin_ffs(value); -#else - __asm__ volatile ( - "rbit w1, %w0\n" - "cmp %w0, 0\n" - "clz w1, w1\n" - "csinc %w0, wzr, w1, eq\n" - : "=r"(value) - : "0"(value) - ); - return value; -#endif -} - -#endif /* RT_USING_CPU_FFS */ - #ifdef ARCH_USING_HW_THREAD_SELF rt_inline struct rt_thread *rt_hw_thread_self(void) { |
