compiler-intel.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __LINUX_COMPILER_H
  2. #error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
  3. #endif
  4. #ifdef __ECC
  5. /* Some compiler specific definitions are overwritten here
  6. * for Intel ECC compiler
  7. */
  8. #include <asm/intrinsics.h>
  9. /* Intel ECC compiler doesn't support gcc specific asm stmts.
  10. * It uses intrinsics to do the equivalent things.
  11. */
  12. #undef barrier
  13. #undef barrier_data
  14. #undef RELOC_HIDE
  15. #undef OPTIMIZER_HIDE_VAR
  16. #define barrier() __memory_barrier()
  17. #define barrier_data(ptr) barrier()
  18. #define RELOC_HIDE(ptr, off) \
  19. ({ unsigned long __ptr; \
  20. __ptr = (unsigned long) (ptr); \
  21. (typeof(ptr)) (__ptr + (off)); })
  22. /* This should act as an optimization barrier on var.
  23. * Given that this compiler does not have inline assembly, a compiler barrier
  24. * is the best we can do.
  25. */
  26. #define OPTIMIZER_HIDE_VAR(var) barrier()
  27. /* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
  28. #define __must_be_array(a) 0
  29. #endif
  30. #ifndef __HAVE_BUILTIN_BSWAP16__
  31. /* icc has this, but it's called _bswap16 */
  32. #define __HAVE_BUILTIN_BSWAP16__
  33. #define __builtin_bswap16 _bswap16
  34. #endif