diff --git a/bindings/msvc_native/unicorn/unicorn.vcxproj b/bindings/msvc_native/unicorn/unicorn.vcxproj
index 7dc5e550..e71595d2 100644
--- a/bindings/msvc_native/unicorn/unicorn.vcxproj
+++ b/bindings/msvc_native/unicorn/unicorn.vcxproj
@@ -281,7 +281,7 @@
true
true
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;inline=__inline;__func__=__FUNCTION__;__i386__;UNICORN_HAS_X86
- MultiThreadedDebug
+ MultiThreaded
.;..;../../../include;../../../qemu;../../../qemu/include;../../../qemu/tcg
/wd4018 /wd4244 /wd4267 %(AdditionalOptions)
false
@@ -306,7 +306,7 @@
true
true
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;inline=__inline;__func__=__FUNCTION__;__x86_64__;UNICORN_HAS_X86
- MultiThreadedDebug
+ MultiThreaded
.;..;../../../include;../../../qemu;../../../qemu/include;../../../qemu/tcg
/wd4018 /wd4244 /wd4267 %(AdditionalOptions)
false
diff --git a/qemu/target-i386/cpu.c b/qemu/target-i386/cpu.c
index 1c8bf86b..4661c228 100644
--- a/qemu/target-i386/cpu.c
+++ b/qemu/target-i386/cpu.c
@@ -1562,8 +1562,9 @@ static void x86_cpu_get_feature_words(struct uc_struct *uc, Object *obj, Visitor
uint32_t *array = (uint32_t *)opaque;
FeatureWord w;
Error *err = NULL;
- X86CPUFeatureWordInfo word_infos[FEATURE_WORDS] = { 0 };
- X86CPUFeatureWordInfoList list_entries[FEATURE_WORDS] = { 0 };
+ // These all get setup below, so no need to initialise them here.
+ X86CPUFeatureWordInfo word_infos[FEATURE_WORDS];
+ X86CPUFeatureWordInfoList list_entries[FEATURE_WORDS];
X86CPUFeatureWordInfoList *list = NULL;
for (w = 0; w < FEATURE_WORDS; w++) {
diff --git a/qemu/target-i386/svm_helper.c b/qemu/target-i386/svm_helper.c
index df69c816..4d415cd8 100644
--- a/qemu/target-i386/svm_helper.c
+++ b/qemu/target-i386/svm_helper.c
@@ -486,7 +486,7 @@ void helper_svm_check_intercept_param(CPUX86State *env, uint32_t type,
if (likely(!(env->hflags & HF_SVMI_MASK))) {
return;
}
- if( type >= SVM_EXIT_READ_CR0 && type <= SVM_EXIT_READ_CR0 + 8 ) {
+ if( (int32_t)type >= SVM_EXIT_READ_CR0 && type <= SVM_EXIT_READ_CR0 + 8 ) {
if (env->intercept_cr_read & (1 << (type - SVM_EXIT_READ_CR0))) {
helper_vmexit(env, type, param);
}
@@ -515,7 +515,7 @@ void helper_svm_check_intercept_param(CPUX86State *env, uint32_t type,
uint32_t t0, t1;
uint32_t ecx = (uint32_t)env->regs[R_ECX];
- if( ecx >= 0 && ecx <= 0x1fff ) {
+ if( (int32_t)ecx >= 0 && ecx <= 0x1fff ) {
t0 = (env->regs[R_ECX] * 2) % 8;
t1 = (env->regs[R_ECX] * 2) / 8;
} else if( ecx >= 0xc0000000 && ecx <= 0xc0001fff ) {
diff --git a/qemu/target-i386/translate.c b/qemu/target-i386/translate.c
index 2c73434e..269b3a51 100644
--- a/qemu/target-i386/translate.c
+++ b/qemu/target-i386/translate.c
@@ -3379,37 +3379,37 @@ static const struct SSEOpHelper_epp sse_op_table6[256] = {
SSSE3_OP(psignw),
SSSE3_OP(psignd),
SSSE3_OP(pmulhrsw),
- {0},{0},{0},{0}, // filler: 0x0c - 0x0f
+ {{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x0c - 0x0f
SSE41_OP(pblendvb),
- {0},{0},{0}, // filler: 0x11 - 0x13
+ {{0},0},{{0},0},{{0},0}, // filler: 0x11 - 0x13
SSE41_OP(blendvps),
SSE41_OP(blendvpd),
- {0}, // filler: 0x16
+ {{0},0}, // filler: 0x16
SSE41_OP(ptest),
- {0},{0},{0},{0}, // filler: 0x18 - 0x1b
+ {{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x18 - 0x1b
SSSE3_OP(pabsb),
SSSE3_OP(pabsw),
SSSE3_OP(pabsd),
- {0}, // filler: 0x1f
+ {{0},0}, // filler: 0x1f
SSE41_OP(pmovsxbw),
SSE41_OP(pmovsxbd),
SSE41_OP(pmovsxbq),
SSE41_OP(pmovsxwd),
SSE41_OP(pmovsxwq),
SSE41_OP(pmovsxdq),
- {0},{0}, // filler: 0x26 - 0x27
+ {{0},0},{{0},0}, // filler: 0x26 - 0x27
SSE41_OP(pmuldq),
SSE41_OP(pcmpeqq),
SSE41_SPECIAL, /* movntqda */
SSE41_OP(packusdw),
- {0},{0},{0},{0}, // filler: 0x2c - 0x2f
+ {{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x2c - 0x2f
SSE41_OP(pmovzxbw),
SSE41_OP(pmovzxbd),
SSE41_OP(pmovzxbq),
SSE41_OP(pmovzxwd),
SSE41_OP(pmovzxwq),
SSE41_OP(pmovzxdq),
- {0}, // filler: 0x36
+ {{0},0}, // filler: 0x36
SSE42_OP(pcmpgtq),
SSE41_OP(pminsb),
SSE41_OP(pminsd),
@@ -3422,29 +3422,29 @@ static const struct SSEOpHelper_epp sse_op_table6[256] = {
SSE41_OP(pmulld),
SSE41_OP(phminposuw),
// filler: 0x42 - 0xda
- {0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},
AESNI_OP(aesimc),
AESNI_OP(aesenc),
AESNI_OP(aesenclast),
AESNI_OP(aesdec),
AESNI_OP(aesdeclast),
// filler: 0xe0 - 0xff
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
};
static const struct SSEOpHelper_eppi sse_op_table7[256] = {
#ifdef _MSC_VER
- {0},{0},{0},{0},{0},{0},{0},{0}, // filler: 0x00 - 0x07
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x00 - 0x07
SSE41_OP(roundps),
SSE41_OP(roundpd),
SSE41_OP(roundss),
@@ -3453,43 +3453,43 @@ static const struct SSEOpHelper_eppi sse_op_table7[256] = {
SSE41_OP(blendpd),
SSE41_OP(pblendw),
SSSE3_OP(palignr),
- {0},{0},{0},{0}, // filler: 0x10 - 0x13
+ {{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x10 - 0x13
SSE41_SPECIAL, /* pextrb */
SSE41_SPECIAL, /* pextrw */
SSE41_SPECIAL, /* pextrd/pextrq */
SSE41_SPECIAL, /* extractps */
- {0},{0},{0},{0},{0},{0},{0},{0}, // filler: 0x18 - 0x1f
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, // filler: 0x18 - 0x1f
SSE41_SPECIAL, /* pinsrb */
SSE41_SPECIAL, /* insertps */
SSE41_SPECIAL, /* pinsrd/pinsrq */
// filler: 0x23 - 0x3f
- {0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
SSE41_OP(dpps),
SSE41_OP(dppd),
SSE41_OP(mpsadbw),
- {0}, // filler: 0x43
+ {{0},0}, // filler: 0x43
PCLMULQDQ_OP(pclmulqdq),
// filler: 0x45 - 0x5f
- {0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
+ {{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
SSE42_OP(pcmpestrm),
SSE42_OP(pcmpestri),
SSE42_OP(pcmpistrm),
SSE42_OP(pcmpistri),
// filler: 0x64 - 0xde
- {0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},
+ {{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
AESNI_OP(aeskeygenassist),
// filler: 0xe0 - 0xff
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
- {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
+ {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},
#else
[0x08] = SSE41_OP(roundps),
[0x09] = SSE41_OP(roundpd),
diff --git a/qemu/translate-all.c b/qemu/translate-all.c
index f9e8e9ff..1a96c343 100644
--- a/qemu/translate-all.c
+++ b/qemu/translate-all.c
@@ -288,14 +288,14 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
}
#ifdef _WIN32
-static inline void map_exec(void *addr, long size)
+static inline QEMU_UNUSED_FUNC void map_exec(void *addr, long size)
{
DWORD old_protect;
VirtualProtect(addr, size,
PAGE_EXECUTE_READWRITE, &old_protect);
}
#else
-static inline void map_exec(void *addr, long size)
+static inline QEMU_UNUSED_FUNC void map_exec(void *addr, long size)
{
unsigned long start, end, page_size;