aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArtyom Tarasenko <atar4qemu@gmail.com>2015-06-23 14:30:17 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-26 16:00:50 +0200
commit34664507c7f038842f20a2c787915680b1fabba2 (patch)
tree839360baafae1d835e39f55d18aac839e132b108 /include
parent0a4a0312bf8b029cbd32a97db2cad669cf65ac49 (diff)
downloadqemu-34664507c7f038842f20a2c787915680b1fabba2.zip
qemu-34664507c7f038842f20a2c787915680b1fabba2.tar.gz
qemu-34664507c7f038842f20a2c787915680b1fabba2.tar.bz2
qemu-common: add VEC_OR macro
Intel C Compiler version 15.0.3.187 Build 20150407 doesn't support '|' function for non floating-point simd operands. Define VEC_OR macro which uses _mm_or_si128 supported both in icc and gcc on x86 platform. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Message-Id: <54c804cdb3b3a93e93ef98f085dc57c4092580b7.1435062067.git.atar4qemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index d52d09c..5be3cdd 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -455,6 +455,7 @@ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
#define VECTYPE __vector unsigned char
#define SPLAT(p) vec_splat(vec_ld(0, p), 0)
#define ALL_EQ(v1, v2) vec_all_eq(v1, v2)
+#define VEC_OR(v1, v2) ((v1) | (v2))
/* altivec.h may redefine the bool macro as vector type.
* Reset it to POSIX semantics. */
#define bool _Bool
@@ -463,10 +464,12 @@ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
#define VECTYPE __m128i
#define SPLAT(p) _mm_set1_epi8(*(p))
#define ALL_EQ(v1, v2) (_mm_movemask_epi8(_mm_cmpeq_epi8(v1, v2)) == 0xFFFF)
+#define VEC_OR(v1, v2) (_mm_or_si128(v1, v2))
#else
#define VECTYPE unsigned long
#define SPLAT(p) (*(p) * (~0UL / 255))
#define ALL_EQ(v1, v2) ((v1) == (v2))
+#define VEC_OR(v1, v2) ((v1) | (v2))
#endif
#define BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR 8