Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mono/metadata/w32file-win32.c2
-rw-r--r--mono/mini/interp/interp.c6
-rw-r--r--mono/mini/mini-amd64.c2
-rw-r--r--mono/mini/mini-codegen.c4
-rw-r--r--mono/mini/mini-llvm-cpp.cpp5
-rw-r--r--mono/mini/mini-llvm.c2
-rw-r--r--mono/sgen/sgen-gc.h2
-rw-r--r--mono/sgen/sgen-los.c2
-rw-r--r--mono/sgen/sgen-pinning-stats.c4
-rw-r--r--mono/sgen/sgen-pointer-queue.c6
-rw-r--r--msvc/libmini-llvm.targets1
-rw-r--r--msvc/mono.external.targets8
12 files changed, 30 insertions, 14 deletions
diff --git a/mono/metadata/w32file-win32.c b/mono/metadata/w32file-win32.c
index 4ff912b799c..81f2bbd3ee2 100644
--- a/mono/metadata/w32file-win32.c
+++ b/mono/metadata/w32file-win32.c
@@ -375,7 +375,7 @@ mono_w32file_get_file_system_type (const gunichar2 *path, gunichar2 *fsbuffer, g
{
gboolean res;
MONO_ENTER_GC_SAFE;
- res = GetVolumeInformationW (path, NULL, NULL, NULL, NULL, NULL, fsbuffer, fsbuffersize);
+ res = GetVolumeInformationW (path, NULL, 0, NULL, NULL, NULL, fsbuffer, fsbuffersize);
MONO_EXIT_GC_SAFE;
return res;
}
diff --git a/mono/mini/interp/interp.c b/mono/mini/interp/interp.c
index 2a43fe77403..f8f3864a81f 100644
--- a/mono/mini/interp/interp.c
+++ b/mono/mini/interp/interp.c
@@ -74,6 +74,10 @@
#include <mono/mini/mini-arm.h>
#endif
+#ifdef _MSC_VER
+#pragma warning(disable:4102)
+#endif
+
static inline void
init_frame (InterpFrame *frame, InterpFrame *parent_frame, InterpMethod *rmethod, stackval *method_args, stackval *method_retval)
{
@@ -1891,6 +1895,8 @@ do_icall (ThreadContext *context, MonoMethodSignature *sig, int op, stackval *sp
stackval_from_data (sig->ret, &sp [-1], (char*) &sp [-1].data.p, sig->pinvoke);
interp_pop_lmf (&ext);
+
+
exit_icall:
return sp;
}
diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c
index 76798b2c7d4..ed3a5155f0c 100644
--- a/mono/mini/mini-amd64.c
+++ b/mono/mini/mini-amd64.c
@@ -4818,7 +4818,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* Restore callee saved registers */
save_area_offset = cfg->arch.reg_save_area_offset;
for (i = 0; i < AMD64_NREG; ++i)
- if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->used_int_regs & (1 << i))) {
+ if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->used_int_regs & ((regmask_t)1 << i))) {
amd64_mov_reg_membase (code, i, cfg->frame_reg, save_area_offset, 8);
save_area_offset += 8;
}
diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c
index 91b756f37fc..ccfdb2582bd 100644
--- a/mono/mini/mini-codegen.c
+++ b/mono/mini/mini-codegen.c
@@ -268,12 +268,12 @@ mono_call_inst_add_outarg_reg (MonoCompile *cfg, MonoCallInst *call, int vreg, i
if (G_UNLIKELY (bank)) {
g_assert (vreg >= regbank_size [bank]);
g_assert (hreg < regbank_size [bank]);
- call->used_fregs |= 1 << hreg;
+ call->used_fregs |= (regmask_t)1 << hreg;
call->out_freg_args = g_slist_append_mempool (cfg->mempool, call->out_freg_args, (gpointer)(gssize)(regpair));
} else {
g_assert (vreg >= MONO_MAX_IREGS);
g_assert (hreg < MONO_MAX_IREGS);
- call->used_iregs |= 1 << hreg;
+ call->used_iregs |= (regmask_t)1 << hreg;
call->out_ireg_args = g_slist_append_mempool (cfg->mempool, call->out_ireg_args, (gpointer)(gssize)(regpair));
}
}
diff --git a/mono/mini/mini-llvm-cpp.cpp b/mono/mini/mini-llvm-cpp.cpp
index 9fef9095efc..8756149c1c0 100644
--- a/mono/mini/mini-llvm-cpp.cpp
+++ b/mono/mini/mini-llvm-cpp.cpp
@@ -21,6 +21,11 @@
// possible
//
+#ifdef _MSC_VER
+#pragma warning(disable:4141)
+#pragma warning(disable:4800)
+#endif
+
#include "config.h"
#include <stdint.h>
diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c
index 4d4e4a867fa..8754e71b7ae 100644
--- a/mono/mini/mini-llvm.c
+++ b/mono/mini/mini-llvm.c
@@ -5240,7 +5240,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
rhs = LLVMBuildSExt (builder, convert (ctx, rhs, LLVMInt32Type ()), LLVMInt64Type (), "");
- v1 = LLVMBuildMul (builder, convert (ctx, rhs, IntPtrType ()), LLVMConstInt (IntPtrType (), (1 << ins->backend.shift_amount), FALSE), "");
+ v1 = LLVMBuildMul (builder, convert (ctx, rhs, IntPtrType ()), LLVMConstInt (IntPtrType (), ((unsigned long long)1 << ins->backend.shift_amount), FALSE), "");
v2 = LLVMBuildAdd (builder, convert (ctx, lhs, IntPtrType ()), v1, "");
values [ins->dreg] = LLVMBuildAdd (builder, v2, LLVMConstInt (IntPtrType (), ins->inst_imm, FALSE), dname);
break;
diff --git a/mono/sgen/sgen-gc.h b/mono/sgen/sgen-gc.h
index 66a5b3dd57c..29269abaf1e 100644
--- a/mono/sgen/sgen-gc.h
+++ b/mono/sgen/sgen-gc.h
@@ -1111,7 +1111,7 @@ void sgen_env_var_error (const char *env_var, const char *fallback, const char *
/* Utilities */
-void sgen_qsort (void *array, size_t count, size_t element_size, int (*compare) (const void*, const void*));
+void sgen_qsort (void *const array, const size_t count, const size_t element_size, int (*compare) (const void*, const void*));
gint64 sgen_timestamp (void);
/*
diff --git a/mono/sgen/sgen-los.c b/mono/sgen/sgen-los.c
index 87e055a27f4..f5a52112750 100644
--- a/mono/sgen/sgen-los.c
+++ b/mono/sgen/sgen-los.c
@@ -716,7 +716,9 @@ LOSObject*
sgen_los_header_for_object (GCObject *data)
{
#if _MSC_VER
+#pragma warning(disable:4311)
return (LOSObject*)((char*)data - (int)(&(((LOSObject*)0)->data)));
+#pragma warning(default:4311)
#else
return (LOSObject*)((char*)data - sizeof (LOSObject));
#endif
diff --git a/mono/sgen/sgen-pinning-stats.c b/mono/sgen/sgen-pinning-stats.c
index 448fcca927c..d953debde99 100644
--- a/mono/sgen/sgen-pinning-stats.c
+++ b/mono/sgen/sgen-pinning-stats.c
@@ -220,7 +220,7 @@ sgen_pin_stats_report (void)
int i;
mono_gc_printf (sgen_gc_debug_file, "%-50s", name);
for (i = 0; i < PIN_TYPE_MAX; ++i)
- mono_gc_printf (sgen_gc_debug_file, " %10ld", pinned_entry->num_pins [i]);
+ mono_gc_printf (sgen_gc_debug_file, " %10zd", pinned_entry->num_pins [i]);
mono_gc_printf (sgen_gc_debug_file, "\n");
} SGEN_HASH_TABLE_FOREACH_END;
@@ -229,7 +229,7 @@ sgen_pin_stats_report (void)
mono_gc_printf (sgen_gc_debug_file, "%-50s %10ld\n", name, remset_entry->num_remsets);
} SGEN_HASH_TABLE_FOREACH_END;
- mono_gc_printf (sgen_gc_debug_file, "\nTotal bytes pinned from stack: %ld static: %ld other: %ld\n",
+ mono_gc_printf (sgen_gc_debug_file, "\nTotal bytes pinned from stack: %zd static: %zd other: %zd\n",
pinned_byte_counts [PIN_TYPE_STACK],
pinned_byte_counts [PIN_TYPE_STATIC_DATA],
pinned_byte_counts [PIN_TYPE_OTHER]);
diff --git a/mono/sgen/sgen-pointer-queue.c b/mono/sgen/sgen-pointer-queue.c
index ed7d92f6f2a..3d4f6afe951 100644
--- a/mono/sgen/sgen-pointer-queue.c
+++ b/mono/sgen/sgen-pointer-queue.c
@@ -39,7 +39,7 @@ realloc_queue (SgenPointerQueue *queue)
sgen_free_internal_dynamic (queue->data, sizeof (void*) * queue->size, queue->mem_type);
queue->data = new_data;
queue->size = new_size;
- SGEN_LOG (4, "Reallocated pointer queue to size: %lu", new_size);
+ SGEN_LOG (4, "Reallocated pointer queue to size: %zu", new_size);
}
gboolean
@@ -107,7 +107,7 @@ sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue)
void **start, **cur, **end;
/* sort and uniq pin_queue: we just sort and we let the rest discard multiple values */
/* it may be better to keep ranges of pinned memory instead of individually pinning objects */
- SGEN_LOG (5, "Sorting pointer queue, size: %lu", queue->next_slot);
+ SGEN_LOG (5, "Sorting pointer queue, size: %zu", queue->next_slot);
if (queue->next_slot > 1)
sgen_sort_addresses (queue->data, queue->next_slot);
start = cur = queue->data;
@@ -119,7 +119,7 @@ sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue)
start++;
};
queue->next_slot = start - queue->data;
- SGEN_LOG (5, "Pointer queue reduced to size: %lu", queue->next_slot);
+ SGEN_LOG (5, "Pointer queue reduced to size: %zu", queue->next_slot);
}
/*
diff --git a/msvc/libmini-llvm.targets b/msvc/libmini-llvm.targets
index 751007c3392..f5f2f1d8e60 100644
--- a/msvc/libmini-llvm.targets
+++ b/msvc/libmini-llvm.targets
@@ -15,6 +15,7 @@
</ClCompile>
<ClCompile Include="$(MonoSourceLocation)\mono\mini\llvm-runtime.cpp">
<ExcludedFromBuild>$(ExcludeLLVMFromWindowsBuild)</ExcludedFromBuild>
+ <ExceptionHandling>SyncCThrow</ExceptionHandling>
<_MonoLLVMSourceFile>true</_MonoLLVMSourceFile>
</ClCompile>
<ClCompile Include="$(MonoSourceLocation)\mono\mini\mini-llvm-cpp.cpp">
diff --git a/msvc/mono.external.targets b/msvc/mono.external.targets
index 3489b874acc..70682389c89 100644
--- a/msvc/mono.external.targets
+++ b/msvc/mono.external.targets
@@ -179,9 +179,11 @@
</_GetLLVMConfiguration>
<PropertyGroup>
- <_MonoLLVMConfigComponents>analysis core bitwriter mcjit x86codegen</_MonoLLVMConfigComponents>
- <_MonoLLVMConfigComponents Condition="$(MONO_LLVM_API_VERSION) &lt; 600">$(_MonoLLVMConfigComponents) jit</_MonoLLVMConfigComponents>
- <_MonoLLVMConfigComponents Condition="$(MONO_LLVM_API_VERSION) &gt;= 600">$(_MonoLLVMConfigComponents) orcjit</_MonoLLVMConfigComponents>
+ <_MonoLLVMConfigComponents>analysis core bitwriter x86codegen</_MonoLLVMConfigComponents>
+ <!-- Currently LLVM JIT is only supported on OSX and including the libraries will get some duplicated symbols during linking.
+ <_MonoLLVMConfigComponents Condition="$(MONO_LLVM_API_VERSION) &lt; 600">$(_MonoLLVMConfigComponents)mcjit jit</_MonoLLVMConfigComponents>
+ <_MonoLLVMConfigComponents Condition="$(MONO_LLVM_API_VERSION) &gt;= 600">$(_MonoLLVMConfigComponents)mcjit orcjit</_MonoLLVMConfigComponents>
+ -->
</PropertyGroup>
<_GetLLVMConfiguration LLVMConfTool="$(_MonoLLVMConfig)" LLVMConfToolArg="--libnames $(_MonoLLVMConfigComponents)">