From b36f8220b2aa15b2ea50b613bdbfb13231655b82 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 30 Jan 2019 17:02:52 -0500 Subject: [PATCH] tcg: Provide an MSVC compatible version of dup_const This just simply forwards to dup_const_impl --- qemu/tcg/tcg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu/tcg/tcg.h b/qemu/tcg/tcg.h index 89cc518b..2a0259fd 100644 --- a/qemu/tcg/tcg.h +++ b/qemu/tcg/tcg.h @@ -1403,6 +1403,9 @@ void tcg_expand_vec_op(TCGContext *s, TCGOpcode, TCGType, unsigned, TCGArg, ...) // Unicorn: renamed to avoid symbol clashing uint64_t dup_const_impl(unsigned vece, uint64_t c); +#ifdef _MSC_VER +#define dup_const(VECE, C) dup_const_impl(VECE, C) +#else #define dup_const(VECE, C) \ (__builtin_constant_p(VECE) \ ? ( (VECE) == MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \ @@ -1410,6 +1413,7 @@ uint64_t dup_const_impl(unsigned vece, uint64_t c); : (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \ : dup_const_impl(VECE, C)) \ : dup_const_impl(VECE, C)) +#endif /* * Memory helpers that will be used by TCG generated code.