| 13 | RTE_LOG_REGISTER(bitcount_logtype_test, test.bitcount, INFO); |
| 14 | |
| 15 | static int |
| 16 | test_clz32(void) |
| 17 | { |
| 18 | size_t leading; |
| 19 | uint32_t v = 0xffffffff; |
| 20 | |
| 21 | for (leading = 0; v; leading++) { |
| 22 | RTE_TEST_ASSERT(rte_clz32(v) == leading, |
| 23 | "Unexpected count."); |
| 24 | v >>= 1; |
| 25 | } |
| 26 | |
| 27 | return 0; |
| 28 | } |
| 29 | |
| 30 | static int |
| 31 | test_clz64(void) |
nothing calls this directly
no test coverage detected