summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu
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
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')
-rw-r--r--cpukit/score/cpu/arm/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/bfin/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/epiphany/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/i386/rtems/score/cpu.h1
-rw-r--r--cpukit/score/cpu/lm32/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/m32c/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/cpu.h1
-rw-r--r--cpukit/score/cpu/mips/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/moxie/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h8
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h10
-rw-r--r--cpukit/score/cpu/or1k/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/sh/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h6
-rw-r--r--cpukit/score/cpu/sparc64/rtems/score/cpu.h1
-rw-r--r--cpukit/score/cpu/v850/rtems/score/cpu.h2
18 files changed, 4 insertions, 47 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index 43805904e0..815cd9572c 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -200,8 +200,6 @@
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
#define CPU_PER_CPU_CONTROL_SIZE 0
#define CPU_MAXIMUM_PROCESSORS 32
diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h
index 1bff479b06..19b1f03fe2 100644
--- a/cpukit/score/cpu/bfin/rtems/score/cpu.h
+++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h
@@ -851,8 +851,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/**
diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
index c59e54f9f5..e1dae21e40 100644
--- a/cpukit/score/cpu/epiphany/rtems/score/cpu.h
+++ b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
@@ -680,8 +680,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
typedef struct {
/* There is no CPU specific per-CPU state */
} CPU_Per_CPU_control;
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 8f92b2eebd..3f0e3369f9 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -549,7 +549,6 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
*/
#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
{ \
diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h
index 325a8a4dd9..fe948aebf9 100644
--- a/cpukit/score/cpu/lm32/rtems/score/cpu.h
+++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h
@@ -883,8 +883,6 @@ extern char _gp[];
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/**
diff --git a/cpukit/score/cpu/m32c/rtems/score/cpu.h b/cpukit/score/cpu/m32c/rtems/score/cpu.h
index f980abc256..f56e9d7790 100644
--- a/cpukit/score/cpu/m32c/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m32c/rtems/score/cpu.h
@@ -871,8 +871,6 @@ void _CPU_Context_Restart_self(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/**
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
index 470391a027..a426647580 100644
--- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h
@@ -491,7 +491,6 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored );
*/
#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
#if ( M68K_HAS_BFFFO != 1 )
/*
diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
index 6a0c36e90e..59150aceae 100644
--- a/cpukit/score/cpu/mips/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/rtems/score/cpu.h
@@ -884,8 +884,6 @@ extern void mips_break( int error );
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/*
diff --git a/cpukit/score/cpu/moxie/rtems/score/cpu.h b/cpukit/score/cpu/moxie/rtems/score/cpu.h
index 5ba86734d9..3211c3b526 100644
--- a/cpukit/score/cpu/moxie/rtems/score/cpu.h
+++ b/cpukit/score/cpu/moxie/rtems/score/cpu.h
@@ -680,8 +680,6 @@ uint32_t _CPU_ISR_Get_level( void );
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/*
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 ];
}
}
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index a56bc173e3..944f04ab0e 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -1012,16 +1012,6 @@ uint32_t _CPU_ISR_Get_level( void );
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
/**
- * This definition is set to TRUE if the port uses the data tables provided
- * by the generic bitfield manipulation implementation.
- * This can occur when actually using the generic bitfield manipulation
- * implementation or when implementing the same algorithm in assembly
- * language for improved performance. It is unlikely that a port will use
- * the data if it has a bitfield scan instruction.
- */
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-/**
* This routine sets @a _output to the bit number of the first bit
* set in @a _value. @a _value is of CPU dependent type
* @a Priority_bit_map_Word. This type may be either 16 or 32 bits
diff --git a/cpukit/score/cpu/or1k/rtems/score/cpu.h b/cpukit/score/cpu/or1k/rtems/score/cpu.h
index 919017b18c..c75d9d8bad 100644
--- a/cpukit/score/cpu/or1k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/or1k/rtems/score/cpu.h
@@ -675,8 +675,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
typedef struct {
/* There is no CPU specific per-CPU state */
} CPU_Per_CPU_control;
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 287f73d0ef..beb5127d8f 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -922,8 +922,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
/*
* This routine sets _output to the bit number of the first bit
* set in _value. _value is of CPU dependent type Priority_bit_map_Word.
diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
index 8a1cc7f211..53c7eb5f77 100644
--- a/cpukit/score/cpu/sh/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/rtems/score/cpu.h
@@ -652,8 +652,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/*
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index 96b6ac5265..ea90e36752 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -1113,12 +1113,6 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
* CPU model does not have a scan instruction.
*/
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
- /**
- * The SPARC port uses the generic C algorithm for bitfield scan if the
- * CPU model does not have a scan instruction. Thus is needs the generic
- * data table used by that algorithm.
- */
- #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
#else
#error "scan instruction not currently supported by RTEMS!!"
#endif
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
index a669c54436..d2fc81fd45 100644
--- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
@@ -891,7 +891,6 @@ void _CPU_Context_Initialize(
#if ( SPARC_HAS_BITSCAN == 0 )
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
#else
#error "scan instruction not currently supported by RTEMS!!"
#endif
diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h
index ffbb51008b..de655c0f8c 100644
--- a/cpukit/score/cpu/v850/rtems/score/cpu.h
+++ b/cpukit/score/cpu/v850/rtems/score/cpu.h
@@ -835,8 +835,6 @@ void _CPU_Context_Initialize(
#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
/* functions */
/**