Tom Rini | 7c34ae4 | 2020-05-14 08:30:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef __LINUX_COMPILER_TYPES_H |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 3 | #error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead." |
| 4 | #endif |
| 5 | |
| 6 | #ifdef __ECC |
| 7 | |
Tom Rini | 7c34ae4 | 2020-05-14 08:30:06 -0400 | [diff] [blame] | 8 | /* Compiler specific definitions for Intel ECC compiler */ |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 9 | |
| 10 | #include <asm/intrinsics.h> |
| 11 | |
| 12 | /* Intel ECC compiler doesn't support gcc specific asm stmts. |
| 13 | * It uses intrinsics to do the equivalent things. |
| 14 | */ |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 15 | |
Tom Rini | 978a047 | 2016-02-29 11:34:15 -0500 | [diff] [blame] | 16 | #define barrier() __memory_barrier() |
| 17 | #define barrier_data(ptr) barrier() |
| 18 | |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 19 | #define RELOC_HIDE(ptr, off) \ |
| 20 | ({ unsigned long __ptr; \ |
| 21 | __ptr = (unsigned long) (ptr); \ |
| 22 | (typeof(ptr)) (__ptr + (off)); }) |
| 23 | |
| 24 | /* This should act as an optimization barrier on var. |
| 25 | * Given that this compiler does not have inline assembly, a compiler barrier |
| 26 | * is the best we can do. |
| 27 | */ |
| 28 | #define OPTIMIZER_HIDE_VAR(var) barrier() |
| 29 | |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 30 | #endif |
| 31 | |
Masahiro Yamada | c42aad5 | 2014-09-04 02:40:58 +0900 | [diff] [blame] | 32 | /* icc has this, but it's called _bswap16 */ |
| 33 | #define __HAVE_BUILTIN_BSWAP16__ |
| 34 | #define __builtin_bswap16 _bswap16 |