diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-08 10:10:40 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-08 15:48:03 +0200 |
commit | 18e29faf9898a4011e042daaa75bc30a7b56ffdd (patch) | |
tree | c3545114d678d45217180aa21eeafba2ccd1c5e6 /cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h | |
parent | powerpc: Define bitmap defines to FALSE (diff) | |
download | rtems-18e29faf9898a4011e042daaa75bc30a7b56ffdd.tar.bz2 |
score: Delete CPU_USE_GENERIC_BITFIELD_DATA
Rename __log2table into _Bitfield_Leading_zeros since it acually returns
the count of leading zeros of an 8-bit integer. The value for zero is a
bit odd. Provide it unconditionally.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h b/cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h index 0ec259aa0c..bf2390a51f 100644 --- a/cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h +++ b/cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h @@ -37,17 +37,17 @@ static inline unsigned _Nios2_Count_leading_zeros( uint32_t p ) if ( p <= 0xffffu ) { if ( p < 0x100u ) { - bitIdx = __log2table[ p ] + 24u; + bitIdx = _Bitfield_Leading_zeros[ p ] + 24u; } else { - bitIdx = __log2table[ p >> 8u ] + 16u; + bitIdx = _Bitfield_Leading_zeros[ p >> 8u ] + 16u; } } else { p >>= 16u; if ( p < 0x100u ) { - bitIdx = __log2table[ p ] + 8u; + bitIdx = _Bitfield_Leading_zeros[ p ] + 8u; } else { - bitIdx = __log2table[ p >> 8u ]; + bitIdx = _Bitfield_Leading_zeros[ p >> 8u ]; } } |