diff options
Diffstat (limited to 'cpukit/score/include/rtems/score/basedefs.h')
-rw-r--r-- | cpukit/score/include/rtems/score/basedefs.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h index ea4d8314ce..d142163e91 100644 --- a/cpukit/score/include/rtems/score/basedefs.h +++ b/cpukit/score/include/rtems/score/basedefs.h @@ -222,13 +222,15 @@ #endif /** - * @brief Obfuscates the pointer so that the compiler cannot perform - * optimizations based on the pointer value. + * @brief Obfuscates the variable so that the compiler cannot perform + * optimizations based on the variable value. + * + * The variable must be simple enough to fit into a register. */ #if defined(__GNUC__) - #define RTEMS_OBFUSCATE_POINTER( _ptr ) __asm__("" : "+r" (_ptr)) + #define RTEMS_OBFUSCATE_VARIABLE( _var ) __asm__("" : "+r" (_var)) #else - #define RTEMS_OBFUSCATE_POINTER( _ptr ) (void) (_ptr) + #define RTEMS_OBFUSCATE_VARIABLE( _var ) (void) (_var) #endif #if __cplusplus >= 201103L |