compiler-intel.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 RELOC_HIDE
  13. #undef OPTIMIZER_HIDE_VAR
  14. #define RELOC_HIDE(ptr, off) \
  15. ({ unsigned long __ptr; \
  16. __ptr = (unsigned long) (ptr); \
  17. (typeof(ptr)) (__ptr + (off)); })
  18. /* This should act as an optimization barrier on var.
  19. * Given that this compiler does not have inline assembly, a compiler barrier
  20. * is the best we can do.
  21. */
  22. #define OPTIMIZER_HIDE_VAR(var) barrier()
  23. /* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
  24. #define __must_be_array(a) 0
  25. #endif
  26. #ifndef __HAVE_BUILTIN_BSWAP16__
  27. /* icc has this, but it's called _bswap16 */
  28. #define __HAVE_BUILTIN_BSWAP16__
  29. #define __builtin_bswap16 _bswap16
  30. #endif