blob: 1a97cac7dcb2d4806d8db6bb6a43972bd6185325 [file] [log] [blame]
Robert P. J. Day94f582f2007-10-16 23:26:11 -07001#ifndef __LINUX_COMPILER_H
2#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
3#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
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
Cesar Eduardo Barrosfd146e02013-11-25 22:00:41 -020018#undef OPTIMIZER_HIDE_VAR
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
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
Cesar Eduardo Barrosfd146e02013-11-25 22:00:41 -020027/* 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
Rusty Russellc5e631c2007-05-06 14:51:05 -070033/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
34#define __must_be_array(a) 0
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036#endif