Changeset 18e29faf in rtems


Ignore:
Timestamp:
Jun 8, 2016, 8:10:40 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b04b76c6
Parents:
987ea1a
git-author:
Sebastian Huber <sebastian.huber@…> (06/08/16 08:10:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/08/16 13:48:03)
Message:

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.

Location:
cpukit/score
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    r987ea1a r18e29faf  
    200200
    201201#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    202 
    203 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    204202
    205203#define CPU_PER_CPU_CONTROL_SIZE 0
  • cpukit/score/cpu/bfin/rtems/score/cpu.h

    r987ea1a r18e29faf  
    852852#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    853853
    854 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    855 
    856854/* functions */
    857855
  • cpukit/score/cpu/epiphany/rtems/score/cpu.h

    r987ea1a r18e29faf  
    681681#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    682682
    683 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    684 
    685683typedef struct {
    686684/* There is no CPU specific per-CPU state */
  • cpukit/score/cpu/i386/rtems/score/cpu.h

    r987ea1a r18e29faf  
    550550
    551551#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
    552 #define CPU_USE_GENERIC_BITFIELD_DATA FALSE
    553552
    554553#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
  • cpukit/score/cpu/lm32/rtems/score/cpu.h

    r987ea1a r18e29faf  
    884884#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    885885
    886 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    887 
    888886/* functions */
    889887
  • cpukit/score/cpu/m32c/rtems/score/cpu.h

    r987ea1a r18e29faf  
    872872#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    873873
    874 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    875 
    876874/* functions */
    877875
  • cpukit/score/cpu/m68k/rtems/score/cpu.h

    r987ea1a r18e29faf  
    492492
    493493#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
    494 #define CPU_USE_GENERIC_BITFIELD_DATA FALSE
    495494
    496495#if ( M68K_HAS_BFFFO != 1 )
  • cpukit/score/cpu/mips/rtems/score/cpu.h

    r987ea1a r18e29faf  
    885885#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    886886
    887 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    888 
    889887/* functions */
    890888
  • cpukit/score/cpu/moxie/rtems/score/cpu.h

    r987ea1a r18e29faf  
    681681#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    682682
    683 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    684 
    685683/* functions */
    686684
  • cpukit/score/cpu/nios2/rtems/score/cpu.h

    r987ea1a r18e29faf  
    105105
    106106#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    107 
    108 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    109107
    110108#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
  • cpukit/score/cpu/nios2/rtems/score/nios2-count-zeros.h

    r987ea1a r18e29faf  
    3838  if ( p <= 0xffffu ) {
    3939    if ( p < 0x100u ) {
    40       bitIdx = __log2table[ p ] + 24u;
     40      bitIdx = _Bitfield_Leading_zeros[ p ] + 24u;
    4141    } else {
    42       bitIdx = __log2table[ p >> 8u ] + 16u;
     42      bitIdx = _Bitfield_Leading_zeros[ p >> 8u ] + 16u;
    4343    }
    4444  } else {
     
    4646
    4747    if ( p < 0x100u ) {
    48       bitIdx = __log2table[ p ] + 8u;
     48      bitIdx = _Bitfield_Leading_zeros[ p ] + 8u;
    4949    } else {
    50       bitIdx = __log2table[ p >> 8u ];
     50      bitIdx = _Bitfield_Leading_zeros[ p >> 8u ];
    5151    }
    5252  }
  • cpukit/score/cpu/no_cpu/rtems/score/cpu.h

    r987ea1a r18e29faf  
    10131013
    10141014/**
    1015  * This definition is set to TRUE if the port uses the data tables provided
    1016  * by the generic bitfield manipulation implementation.
    1017  * This can occur when actually using the generic bitfield manipulation
    1018  * implementation or when implementing the same algorithm in assembly
    1019  * language for improved performance.  It is unlikely that a port will use
    1020  * the data if it has a bitfield scan instruction.
    1021  */
    1022 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    1023 
    1024 /**
    10251015 * This routine sets @a _output to the bit number of the first bit
    10261016 * set in @a _value.  @a _value is of CPU dependent type
  • cpukit/score/cpu/or1k/rtems/score/cpu.h

    r987ea1a r18e29faf  
    676676#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    677677
    678 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    679 
    680678typedef struct {
    681679/* There is no CPU specific per-CPU state */
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    r987ea1a r18e29faf  
    923923#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
    924924
    925 #define CPU_USE_GENERIC_BITFIELD_DATA FALSE
    926 
    927925/*
    928926 *  This routine sets _output to the bit number of the first bit
  • cpukit/score/cpu/sh/rtems/score/cpu.h

    r987ea1a r18e29faf  
    653653#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    654654
    655 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    656 
    657655/* functions */
    658656
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    r987ea1a r18e29faf  
    11141114   */
    11151115  #define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    1116   /**
    1117    * The SPARC port uses the generic C algorithm for bitfield scan if the
    1118    * CPU model does not have a scan instruction.  Thus is needs the generic
    1119    * data table used by that algorithm.
    1120    */
    1121   #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    11221116#else
    11231117  #error "scan instruction not currently supported by RTEMS!!"
  • cpukit/score/cpu/sparc64/rtems/score/cpu.h

    r987ea1a r18e29faf  
    892892#if ( SPARC_HAS_BITSCAN == 0 )
    893893#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    894 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    895894#else
    896895#error "scan instruction not currently supported by RTEMS!!"
  • cpukit/score/cpu/v850/rtems/score/cpu.h

    r987ea1a r18e29faf  
    836836#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
    837837
    838 #define CPU_USE_GENERIC_BITFIELD_DATA TRUE
    839 
    840838/* functions */
    841839
  • cpukit/score/include/rtems/score/prioritybitmapimpl.h

    r987ea1a r18e29faf  
    3434/**@{**/
    3535
    36 #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE )
    37 
    3836/**
    3937 *  This table is used by the generic bitfield routines to perform
     
    4139 *  instructions.
    4240 */
    43 extern const unsigned char __log2table[256];
    44 
    45 #endif
     41extern const unsigned char _Bitfield_Leading_zeros[256];
    4642
    4743/**
     
    7167  { \
    7268    register uint32_t   __value = (uint32_t) (_value); \
    73     register const unsigned char *__p = __log2table; \
     69    register const unsigned char *__p = _Bitfield_Leading_zeros; \
    7470    \
    7571    if ( __value < 0x100 ) \
  • cpukit/score/src/log2table.c

    r987ea1a r18e29faf  
    2222#include <rtems/score/prioritybitmapimpl.h>
    2323
    24 #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE )
    25 const unsigned char __log2table[256] = {
     24const unsigned char _Bitfield_Leading_zeros[256] = {
    2625    7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
    2726    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
     
    4140    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    4241};
    43 #endif
Note: See TracChangeset for help on using the changeset viewer.