compiler-gcc.h 559 B

1234567891011121314151617
  1. /* Never include this file directly. Include <linux/compiler.h> instead. */
  2. /*
  3. * Common definitions for all gcc versions go here.
  4. */
  5. /* Optimization barrier */
  6. /* The "volatile" is due to gcc bugs */
  7. #define barrier() __asm__ __volatile__("": : :"memory")
  8. /* This macro obfuscates arithmetic on a variable address so that gcc
  9. shouldn't recognize the original var, and make assumptions about it */
  10. #define RELOC_HIDE(ptr, off) \
  11. ({ unsigned long __ptr; \
  12. __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \
  13. (typeof(ptr)) (__ptr + (off)); })