diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-13 07:09:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-13 07:15:10 +0200 |
commit | f5eff007a44ad20c2a420b66903508e9d6c3b066 (patch) | |
tree | b5cfd3714b65c65d96297051e0f9342d91beabd1 /cpukit/score/include/rtems/score/basedefs.h | |
parent | libmisc/xz: Add xz decompression. (diff) | |
download | rtems-f5eff007a44ad20c2a420b66903508e9d6c3b066.tar.bz2 |
score: Rename RTEMS_OBFUSCATE_POINTER()
The inline asm construct works for everything which fits into a
register.
Close #2790.
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 |