[mono/mono] [2 commits] cbb0c783: Fix corlib tests with hard coded line numbers.

"Zoltan Varga ([email protected])" <[email protected]> Sun, 3 Nov 2013 21:28:15 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <000001421fddc0a3-a6bfc3e8-d618-4660-a11c-ff08b8da6f1a-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/c508278e9c9f...9eda1b444b0f

   Commit: cbb0c783e697f1d3521ab7be921abeda083e0c96
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-03 21:22:07 GMT
      URL: https://github.com/mono/mono/commit/cbb0c783e697f1d3521ab7be921abeda083e0c96

Fix corlib tests with hard coded line numbers.

Changed paths:
  M mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs

Modified: mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs
===================================================================
@@ -172,7 +172,7 @@ public void TestGetFileLineNumber ()
 							 frame1.GetFileLineNumber (),
 							 "Line number (1)");
 
-			Assert.AreEqual (132,
+			Assert.AreEqual (134,
 							 frame2.GetFileLineNumber (),
 							 "Line number (2)");
 
@@ -307,7 +307,7 @@ public void TestGetFileLineNumber ()
 							 frame1.GetFileLineNumber (),
 							 "Line number (1)");
 
-			Assert.AreEqual (260,
+			Assert.AreEqual (262,
 							 frame2.GetFileLineNumber (),
 							 "Line number (2)");
 		}

   Commit: 9eda1b444b0f01ced08523b0818395d5f92702f9
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-03 21:26:16 GMT
      URL: https://github.com/mono/mono/commit/9eda1b444b0f01ced08523b0818395d5f92702f9

[jit] Reduce the number of #ifdefs in the JIT code by a little.

Changed paths:
  M mono/mini/aot-compiler.c
  M mono/mini/method-to-ir.c
  M mono/mini/mini.c
  M mono/mini/mini.h

Modified: mono/mini/aot-compiler.c
===================================================================
@@ -5194,9 +5194,7 @@ struct _ReadOnlyValue {
 	buf_size = header->num_clauses * 256 + debug_info_size + 2048 + (seq_points ? (seq_points->len * 64) : 0) + cfg->gc_map_size;
 	p = buf = g_malloc (buf_size);
 
-#ifdef MONO_ARCH_HAVE_XP_UNWIND
 	use_unwind_ops = cfg->unwind_ops != NULL;
-#endif
 
 	flags = (jinfo->has_generic_jit_info ? 1 : 0) | (use_unwind_ops ? 2 : 0) | (header->num_clauses ? 4 : 0) | (seq_points ? 8 : 0) | (cfg->compile_llvm ? 16 : 0) | (jinfo->has_try_block_holes ? 32 : 0) | (cfg->gc_map ? 64 : 0) | (jinfo->has_arch_eh_info ? 128 : 0);
 

Modified: mono/mini/method-to-ir.c
===================================================================
@@ -6255,9 +6255,6 @@ gboolean check_linkdemand (MonoCompile *cfg, MonoMethod *caller, MonoMethod *cal
 		case MONO_TYPE_R4:
 			size = 4; break;
 		case MONO_TYPE_R8:
-#ifdef ARM_FPU_FPA
-			return NULL; /* stupid ARM FP swapped format */
-#endif
 		case MONO_TYPE_I8:
 		case MONO_TYPE_U8:
 			size = 8; break;
@@ -11274,9 +11271,7 @@ gboolean check_linkdemand (MonoCompile *cfg, MonoMethod *caller, MonoMethod *cal
 				ins->sreg2 = sp [1]->dreg;
 				MONO_ADD_INS (bblock, ins);
 
-#ifdef MONO_ARCH_DYN_CALL_PARAM_AREA
 				cfg->param_area = MAX (cfg->param_area, MONO_ARCH_DYN_CALL_PARAM_AREA);
-#endif
 
 				ip += 2;
 				inline_costs += 10 * num_calls++;

Modified: mono/mini/mini.c
===================================================================
@@ -75,13 +75,6 @@
 #include "mini-gc.h"
 #include "debugger-agent.h"
 
-/* this macro is used for a runtime check done in mini_init () */
-#ifdef MONO_ARCH_EMULATE_MUL_DIV
-#define EMUL_MUL_DIV 1
-#else
-#define EMUL_MUL_DIV 0
-#endif
-
 static gpointer mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoException **ex);
 
 
@@ -94,20 +87,12 @@
 MONO_FAST_TLS_DECLARE(mono_jit_tls);
 #endif
 
-#ifndef MONO_ARCH_MONITOR_ENTER_ADJUSTMENT
-#define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT 1
-#endif
-
 MonoTraceSpec *mono_jit_trace_calls = NULL;
 gboolean mono_compile_aot = FALSE;
 /* If this is set, no code is generated dynamically, everything is taken from AOT files */
 gboolean mono_aot_only = FALSE;
 /* Whenever to use IMT */
-#ifdef MONO_ARCH_HAVE_IMT
-gboolean mono_use_imt = TRUE;
-#else
-gboolean mono_use_imt = FALSE;
-#endif
+gboolean mono_use_imt = ARCH_HAVE_IMT;
 MonoMethodDesc *mono_inject_async_exc_method = NULL;
 int mono_inject_async_exc_pos;
 MonoMethodDesc *mono_break_at_bb_method = NULL;
@@ -1535,10 +1520,9 @@ void *mono_global_codeman_reserve (int size)
 	res = mono_metadata_signature_alloc (mono_defaults.corlib, arity + 1);
 
 	res->pinvoke = 1;
-#ifdef MONO_ARCH_VARARG_ICALLS
-	/* Only set this only some archs since not all backends can handle varargs+pinvoke */
-	res->call_convention = MONO_CALL_VARARG;
-#endif
+	if (ARCH_VARARG_ICALLS)
+		/* Only set this only some archs since not all backends can handle varargs+pinvoke */
+		res->call_convention = MONO_CALL_VARARG;
 
 #ifdef TARGET_WIN32
 	res->call_convention = MONO_CALL_C;
@@ -4554,7 +4538,6 @@ void *mono_global_codeman_reserve (int size)
 	 * Its possible to generate dwarf unwind info for xdebug etc, but not actually
 	 * using it during runtime, hence the define.
 	 */
-#ifdef MONO_ARCH_HAVE_XP_UNWIND
 	if (cfg->encoded_unwind_ops) {
 		jinfo->used_regs = mono_cache_unwind_info (cfg->encoded_unwind_ops, cfg->encoded_unwind_ops_len);
 		g_free (cfg->encoded_unwind_ops);
@@ -4565,7 +4548,6 @@ void *mono_global_codeman_reserve (int size)
 		jinfo->used_regs = mono_cache_unwind_info (unwind_info, info_len);
 		g_free (unwind_info);
 	}
-#endif
 
 	return jinfo;
 }
@@ -7329,7 +7311,7 @@ static void seq_point_info_free (gpointer value)
 #endif
 
 #if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_SOFT_FLOAT_FALLBACK)
-	if (EMUL_MUL_DIV || mono_arch_is_soft_float ()) {
+	if (ARCH_EMULATE_MUL_DIV || mono_arch_is_soft_float ()) {
 		register_opcode_emulation (OP_FDIV, "__emul_fdiv", "double double double", mono_fdiv, "mono_fdiv", FALSE);
 	}
 #endif

Modified: mono/mini/mini.h
===================================================================
@@ -2816,4 +2816,30 @@ enum {
 #define ARCH_HAVE_TLS_GET_REG 0
 #endif
 
+#ifdef MONO_ARCH_EMULATE_MUL_DIV
+#define ARCH_EMULATE_MUL_DIV 1
+#else
+#define ARCH_EMULATE_MUL_DIV 0
+#endif
+
+#ifndef MONO_ARCH_MONITOR_ENTER_ADJUSTMENT
+#define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT 1
+#endif
+
+#ifndef MONO_ARCH_DYN_CALL_PARAM_AREA
+#define MONO_ARCH_DYN_CALL_PARAM_AREA 0
+#endif
+
+#ifdef MONO_ARCH_HAVE_IMT
+#define ARCH_HAVE_IMT 1
+#else
+#define ARCH_HAVE_IMT 0
+#endif
+
+#ifdef MONO_ARCH_VARARG_ICALLS
+#define ARCH_VARARG_ICALLS 1
+#else
+#define ARCH_VARARG_ICALLS 0
+#endif
+
 #endif /* __MONO_MINI_H__ */


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches