Changeset f5eff00 in rtems


Ignore:
Timestamp:
Oct 13, 2016, 5:09:49 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f45ddee
Parents:
826f3afa
git-author:
Sebastian Huber <sebastian.huber@…> (10/13/16 05:09:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/13/16 05:15:10)
Message:

score: Rename RTEMS_OBFUSCATE_POINTER()

The inline asm construct works for everything which fits into a
register.

Close #2790.

Location:
cpukit/score/include/rtems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/linkersets.h

    r826f3afa rf5eff00  
    3131  do { \
    3232    item = _LINKER_SET_BEGIN( set ); \
    33     RTEMS_OBFUSCATE_POINTER( item ); \
     33    RTEMS_OBFUSCATE_VARIABLE( item ); \
    3434  } while ( 0 )
    3535
     
    3737  do { \
    3838    item = _LINKER_SET_END( set ); \
    39     RTEMS_OBFUSCATE_POINTER( item ); \
     39    RTEMS_OBFUSCATE_VARIABLE( item ); \
    4040  } while ( 0 )
    4141
  • cpukit/score/include/rtems/score/basedefs.h

    r826f3afa rf5eff00  
    223223
    224224/**
    225  * @brief Obfuscates the pointer so that the compiler cannot perform
    226  * optimizations based on the pointer value.
    227  */
    228 #if defined(__GNUC__)
    229   #define RTEMS_OBFUSCATE_POINTER( _ptr ) __asm__("" : "+r" (_ptr))
    230 #else
    231   #define RTEMS_OBFUSCATE_POINTER( _ptr ) (void) (_ptr)
     225 * @brief Obfuscates the variable so that the compiler cannot perform
     226 * optimizations based on the variable value.
     227 *
     228 * The variable must be simple enough to fit into a register.
     229 */
     230#if defined(__GNUC__)
     231  #define RTEMS_OBFUSCATE_VARIABLE( _var ) __asm__("" : "+r" (_var))
     232#else
     233  #define RTEMS_OBFUSCATE_VARIABLE( _var ) (void) (_var)
    232234#endif
    233235
Note: See TracChangeset for help on using the changeset viewer.