summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/nios2
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-08 10:10:40 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-08 15:48:03 +0200
commit18e29faf9898a4011e042daaa75bc30a7b56ffdd (patch)
treec3545114d678d45217180aa21eeafba2ccd1c5e6 /cpukit/score/cpu/nios2
parentpowerpc: Define bitmap defines to FALSE (diff)
downloadrtems-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 'cpukit/score/cpu/nios2')
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
index 0dd7ed4fab..4c56de0a16 100644
--- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h
@@ -105,8 +105,6 @@ extern "C" {
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
#define CPU_PER_CPU_CONTROL_SIZE 0
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 ];
}
}