blob: ba147a1727e6d2fc22c7899fcb5830803c629f41 [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 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#undef RELOC_HIDE
Cesar Eduardo Barrosfe8c8a12013-11-25 22:00:41 -020017#undef OPTIMIZER_HIDE_VAR
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#define RELOC_HIDE(ptr, off) \
20 ({ unsigned long __ptr; \
21 __ptr = (unsigned long) (ptr); \
22 (typeof(ptr)) (__ptr + (off)); })
23
Cesar Eduardo Barrosfe8c8a12013-11-25 22:00:41 -020024/* 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
Rusty Russellc5e631cf2007-05-06 14:51:05 -070030/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
31#define __must_be_array(a) 0
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033#endif
Borislav Petkov94909912007-05-06 14:49:17 -070034
David Woodhousecf66bb92012-12-03 16:25:40 +000035#ifndef __HAVE_BUILTIN_BSWAP16__
36/* icc has this, but it's called _bswap16 */
37#define __HAVE_BUILTIN_BSWAP16__
38#define __builtin_bswap16 _bswap16
39#endif
40