]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/linux/compiler-intel.h
Merge tag 'samsung-clk-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
[mirror_ubuntu-artful-kernel.git] / include / linux / compiler-intel.h
CommitLineData
94f582f8
RD
1#ifndef __LINUX_COMPILER_H
2#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
3#endif
1da177e4
LT
4
5#ifdef __ECC
6
7/* Some compiler specific definitions are overwritten here
8 * for Intel ECC compiler
9 */
10
11#include <asm/intrinsics.h>
12
13/* Intel ECC compiler doesn't support gcc specific asm stmts.
14 * It uses intrinsics to do the equivalent things.
15 */
16#undef barrier
17#undef RELOC_HIDE
fe8c8a12 18#undef OPTIMIZER_HIDE_VAR
1da177e4
LT
19
20#define barrier() __memory_barrier()
21
22#define RELOC_HIDE(ptr, off) \
23 ({ unsigned long __ptr; \
24 __ptr = (unsigned long) (ptr); \
25 (typeof(ptr)) (__ptr + (off)); })
26
fe8c8a12
CEB
27/* This should act as an optimization barrier on var.
28 * Given that this compiler does not have inline assembly, a compiler barrier
29 * is the best we can do.
30 */
31#define OPTIMIZER_HIDE_VAR(var) barrier()
32
c5e631cf
RR
33/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
34#define __must_be_array(a) 0
35
1da177e4 36#endif
94909914 37
cf66bb93
DW
38#ifndef __HAVE_BUILTIN_BSWAP16__
39/* icc has this, but it's called _bswap16 */
40#define __HAVE_BUILTIN_BSWAP16__
41#define __builtin_bswap16 _bswap16
42#endif
43