compiler-intel.h 949 B

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