Merge tag 'upstream-4.19-rc1' of git://git.infradead.org/linux-ubifs
[linux-block.git] / include / linux / compiler-intel.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
d1515582 2#ifndef __LINUX_COMPILER_TYPES_H
94f582f8
RD
3#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
4#endif
1da177e4
LT
5
6#ifdef __ECC
7
8/* Some compiler specific definitions are overwritten here
9 * for Intel ECC compiler
10 */
11
12#include <asm/intrinsics.h>
13
14/* Intel ECC compiler doesn't support gcc specific asm stmts.
15 * It uses intrinsics to do the equivalent things.
16 */
1da177e4 17
b86a50c3 18#define barrier() __memory_barrier()
7829fb09
DB
19#define barrier_data(ptr) barrier()
20
1da177e4
LT
21#define RELOC_HIDE(ptr, off) \
22 ({ unsigned long __ptr; \
23 __ptr = (unsigned long) (ptr); \
24 (typeof(ptr)) (__ptr + (off)); })
25
fe8c8a12
CEB
26/* This should act as an optimization barrier on var.
27 * Given that this compiler does not have inline assembly, a compiler barrier
28 * is the best we can do.
29 */
30#define OPTIMIZER_HIDE_VAR(var) barrier()
31
c5e631cf
RR
32/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
33#define __must_be_array(a) 0
34
1da177e4 35#endif
94909914 36
cf66bb93
DW
37/* icc has this, but it's called _bswap16 */
38#define __HAVE_BUILTIN_BSWAP16__
39#define __builtin_bswap16 _bswap16
cf66bb93 40
815f0ddb
ND
41/* The following are for compatibility with GCC, from compiler-gcc.h,
42 * and may be redefined here because they should not be shared with other
43 * compilers, like clang.
f0907827 44 */
815f0ddb 45#define __visible __attribute__((externally_visible))