2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2017-10-24 11:22:46 +01:00
|
|
|
#ifndef __LINUX_COMPILER_TYPES_H
|
2007-10-16 23:26:11 -07:00
|
|
|
#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
|
|
|
|
|
#endif
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
#ifdef __ECC
|
|
|
|
|
|
|
|
|
|
/* Some compiler specific definitions are overwritten here
|
|
|
|
|
* for Intel ECC compiler
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <asm/intrinsics.h>
|
|
|
|
|
|
|
|
|
|
/* Intel ECC compiler doesn't support gcc specific asm stmts.
|
|
|
|
|
* It uses intrinsics to do the equivalent things.
|
|
|
|
|
*/
|
|
|
|
|
|
2015-06-25 15:01:05 -07:00
|
|
|
#define barrier() __memory_barrier()
|
2015-04-30 04:13:52 +02:00
|
|
|
#define barrier_data(ptr) barrier()
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#define RELOC_HIDE(ptr, off) \
|
|
|
|
|
({ unsigned long __ptr; \
|
|
|
|
|
__ptr = (unsigned long) (ptr); \
|
|
|
|
|
(typeof(ptr)) (__ptr + (off)); })
|
|
|
|
|
|
2013-11-25 22:00:41 -02:00
|
|
|
/* This should act as an optimization barrier on var.
|
|
|
|
|
* Given that this compiler does not have inline assembly, a compiler barrier
|
|
|
|
|
* is the best we can do.
|
|
|
|
|
*/
|
|
|
|
|
#define OPTIMIZER_HIDE_VAR(var) barrier()
|
|
|
|
|
|
2007-05-06 14:51:05 -07:00
|
|
|
/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
|
|
|
|
|
#define __must_be_array(a) 0
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#endif
|
2007-05-06 14:49:17 -07:00
|
|
|
|
2012-12-03 16:25:40 +00:00
|
|
|
/* icc has this, but it's called _bswap16 */
|
|
|
|
|
#define __HAVE_BUILTIN_BSWAP16__
|
|
|
|
|
#define __builtin_bswap16 _bswap16
|
|
|
|
|
|
2018-08-22 16:37:24 -07:00
|
|
|
/* The following are for compatibility with GCC, from compiler-gcc.h,
|
|
|
|
|
* and may be redefined here because they should not be shared with other
|
|
|
|
|
* compilers, like clang.
|
2018-05-08 00:36:27 +02:00
|
|
|
*/
|
2018-08-22 16:37:24 -07:00
|
|
|
#define __visible __attribute__((externally_visible))
|