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
|
|
|
|
|
|
2019-01-02 15:57:49 -05:00
|
|
|
/* Compiler specific definitions for Intel ECC compiler */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
#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()
|
|
|
|
|
|
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
|