#define amd64_sse_xorpd_reg_membase(inst,dreg,basereg,disp) emit_sse_reg_membase ((inst),(dreg),(basereg), (disp), 0x66, 0x0f, 0x57)
+#define amd64_sse_andpd_reg_membase(inst,dreg,basereg,disp) emit_sse_reg_membase ((inst),(dreg),(basereg), (disp), 0x66, 0x0f, 0x54)
+
#define amd64_sse_movsd_reg_reg(inst,dreg,reg) emit_sse_reg_reg ((inst), (dreg), (reg), 0xf2, 0x0f, 0x10)
#define amd64_sse_movsd_reg_membase(inst,dreg,basereg,disp) emit_sse_reg_membase ((inst), (dreg), (basereg), (disp), 0xf2, 0x0f, 0x10)
+2008-04-11 Geoff Norton <gnorton@novell.com>
+
+ * processes.c: The global extern environ doesn't exist on Mac. We
+ need to call NSGetEnviron instead.
+
2008-04-08 Dick Porter <dick@ximian.com>
* processes.c (CreateProcess): Improve the managed binary support,
#include <mono/io-layer/timefuncs-private.h>
/* The process' environment strings */
+#ifdef __APPLE__
+/* Apple defines this in crt_externs.h but doesn't provide that header for
+ * arm-apple-darwin9. We'll manually define the symbol on Apple as it does
+ * in fact exist on all implementations (so far)
+ */
+gchar ***_NSGetEnviron();
+#define environ *_NSGetEnviron()
+#else
extern char **environ;
+#endif
#undef DEBUG
const gunichar2 *appname,
const gunichar2 *cmdline,
guint32 create_flags,
- gpointer environ,
+ gpointer env,
const gunichar2 *cwd,
WapiStartupInfo *startup,
WapiProcessInformation *process_info)
{
/* FIXME: use user information */
- return CreateProcess (appname, cmdline, NULL, NULL, FALSE, create_flags, environ, cwd, startup, process_info);
+ return CreateProcess (appname, cmdline, NULL, NULL, FALSE, create_flags, env, cwd, startup, process_info);
}
static gboolean
+2008-04-12 Zoltan Varga <vargaz@gmail.com>
+
+ * assembly.c (mono_assembly_load_from_full): Do the check for loading other
+ mscorlibs for the non-refonly case as well.
+
+ * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
+ in mono_assembly_load_from_full (). Fixes #378924.
+
+2008-04-11 Geoff Norton <gnorton@novell.com>
+
+ * icall.c: The global extern environ doesn't exist on Mac. We
+ need to call NSGetEnviron instead.
+
2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
verify.c: Add generic method constraint verification.
mono_assembly_fill_assembly_name (image, &ass->aname);
- if (refonly && strcmp (ass->aname.name, "mscorlib") == 0) {
+ if (mono_defaults.corlib && strcmp (ass->aname.name, "mscorlib") == 0) {
// MS.NET doesn't support loading other mscorlibs
g_free (ass);
g_free (base_dir);
- mono_image_close (image);
+ mono_image_addref (mono_defaults.corlib);
*status = MONO_IMAGE_OK;
return mono_defaults.corlib->assembly;
}
*/
#ifndef _MSC_VER
#ifndef __MINGW32_VERSION
+#ifdef __APPLE__
+/* Apple defines this in crt_externs.h but doesn't provide that header for
+ * arm-apple-darwin9. We'll manually define the symbol on Apple as it does
+ * in fact exist on all implementations (so far)
+ */
+gchar ***_NSGetEnviron();
+#define environ *_NSGetEnviron()
+#else
extern
char **environ;
#endif
#endif
+#endif
static MonoArray *
ves_icall_System_Environment_GetEnvironmentVariableNames (void)
image->assembly_name = mono_metadata_string_heap (image,
mono_metadata_decode_row_col (&image->tables [MONO_TABLE_ASSEMBLY],
0, MONO_ASSEMBLY_NAME));
- /* we don't allow loading different mscorlibs */
- if (strcmp (image->assembly_name, "mscorlib") == 0 && mono_defaults.corlib) {
- if (status)
- *status = MONO_IMAGE_OK;
- mono_image_close (image);
- mono_image_addref (mono_defaults.corlib);
- return mono_defaults.corlib;
- }
}
image->module_name = mono_metadata_string_heap (image,
+2008-04-11 Zoltan Varga <vargaz@gmail.com>
+
+ * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
+ SSE2 instructions.
+
+ * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
+
2008-04-11 Zoltan Varga <vargaz@gmail.com>
* mini.c (handle_stack_args): Make this return void since its return value was
*
* Each test needs to be of the form:
*
- * static int test_<result>_<name> ();
+ * public static int test_<result>_<name> ();
*
* where <result> is an integer (the value that needs to be returned by
* the method to make it pass.
class Tests {
- static int Main () {
+ public static int Main () {
return TestDriver.RunTests (typeof (Tests));
}
- static int test_0_sin_precision () {
+ public static int test_0_sin_precision () {
double d1 = Math.Sin (1);
double d2 = Math.Sin (1) - d1;
return (d2 == 0) ? 0 : 1;
}
- static int test_0_cos_precision () {
+ public static int test_0_cos_precision () {
double d1 = Math.Cos (1);
double d2 = Math.Cos (1) - d1;
return (d2 == 0) ? 0 : 1;
}
- static int test_0_tan_precision () {
+ public static int test_0_tan_precision () {
double d1 = Math.Tan (1);
double d2 = Math.Tan (1) - d1;
return (d2 == 0) ? 0 : 1;
}
- static int test_0_atan_precision () {
+ public static int test_0_atan_precision () {
double d1 = Math.Atan (double.NegativeInfinity);
double d2 = Math.Atan (double.NegativeInfinity) - d1;
return (d2 == 0) ? 0 : 1;
}
- static int test_0_sqrt_precision () {
+ public static int test_0_sqrt_precision () {
double d1 = Math.Sqrt (2);
double d2 = Math.Sqrt (2) - d1;
return (d2 == 0) ? 0 : 1;
}
- static int test_2_sqrt () {
+ public static int test_2_sqrt () {
return (int) Math.Sqrt (4);
}
- static int test_0_sqrt_precision_and_not_spill () {
+ public static int test_0_sqrt_precision_and_not_spill () {
double expected = 0;
double[] operands = new double[3];
double[] temporaries = new double[3];
return (result == expected) ? 0 : 1;
}
- static int test_0_sqrt_precision_and_spill () {
+ public static int test_0_sqrt_precision_and_spill () {
double expected = 0;
double[] operands = new double[9];
double[] temporaries = new double[9];
return (result == expected) ? 0 : 1;
}
- static int test_0_div_precision_and_spill () {
+ public static int test_0_div_precision_and_spill () {
double expected = 0;
double[] operands = new double[9];
double[] temporaries = new double[9];
return (result == expected) ? 0 : 1;
}
- static int test_0_sqrt_nan () {
+ public static int test_0_sqrt_nan () {
return Double.IsNaN (Math.Sqrt (Double.NaN)) ? 0 : 1;
}
- static int test_0_sin_nan () {
+ public static int test_0_sin_nan () {
return Double.IsNaN (Math.Sin (Double.NaN)) ? 0 : 1;
}
- static int test_0_cos_nan () {
+ public static int test_0_cos_nan () {
return Double.IsNaN (Math.Cos (Double.NaN)) ? 0 : 1;
}
- static int test_0_tan_nan () {
+ public static int test_0_tan_nan () {
return Double.IsNaN (Math.Tan (Double.NaN)) ? 0 : 1;
}
- static int test_0_atan_nan () {
+ public static int test_0_atan_nan () {
return Double.IsNaN (Math.Atan (Double.NaN)) ? 0 : 1;
}
- static int test_0_min () {
+ public static int test_0_min () {
if (Math.Min (5, 6) != 5)
return 1;
if (Math.Min (6, 5) != 5)
return 0;
}
- static int test_0_max () {
+ public static int test_0_max () {
if (Math.Max (5, 6) != 6)
return 1;
if (Math.Max (6, 5) != 6)
return 6;
return 0;
}
-
+
+ public static int test_0_abs () {
+ double d = -5.0;
+
+ if (Math.Abs (d) != 5.0)
+ return 1;
+ return 0;
+ }
}
br_reg: src1:i len:3
sin: dest:f src1:f len:32
cos: dest:f src1:f len:32
-abs: dest:f src1:f len:32
+abs: dest:f src1:f clob:1 len:32
tan: dest:f src1:f len:59
atan: dest:f src1:f len:9
sqrt: dest:f src1:f len:32
case OP_COS:
EMIT_SSE2_FPFUNC (code, fcos, ins->dreg, ins->sreg1);
break;
- case OP_ABS:
- EMIT_SSE2_FPFUNC (code, fabs, ins->dreg, ins->sreg1);
+ case OP_ABS: {
+ static guint64 d = 0x7fffffffffffffffUL;
+
+ g_assert (ins->sreg1 == ins->dreg);
+
+ mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_R8, &d);
+ amd64_sse_andpd_reg_membase (code, ins->dreg, AMD64_RIP, 0);
break;
+ }
case OP_SQRT:
EMIT_SSE2_FPFUNC (code, fsqrt, ins->dreg, ins->sreg1);
break;
+2008-04-11 Mark Probst <mark.probst@gmail.com>
+
+ * Makefile.am: Added missing files to EXTRA_DIST.
+
2008-04-10 Atsushi Enomoto <atsushi@ximian.com>
* Makefile: fix extra dist file name.
$(RUNTIME21) --security=core-clr-test coreclr-security.exe
endif
+EXTRA_DIST += generic-unboxing.2.il
generic-unboxing.2.dll : generic-unboxing.2.il
$(ILASM) /dll /output:generic-unboxing.2.dll $(srcdir)/generic-unboxing.2.il
+EXTRA_DIST += generic-boxing.2.il
generic-boxing.2.dll : generic-boxing.2.il generic-unboxing.2.dll
$(ILASM) /dll /output:generic-boxing.2.dll $(srcdir)/generic-boxing.2.il
+EXTRA_DIST += generic-unbox.2.cs
generic-unbox.2.exe : generic-unbox.2.cs generic-unboxing.2.dll
$(MCS) -r:generic-unboxing.2.dll $(srcdir)/generic-unbox.2.cs
+EXTRA_DIST += generic-box.2.cs
generic-box.2.exe : generic-box.2.cs generic-unboxing.2.dll generic-boxing.2.dll
$(MCS) -r:generic-unboxing.2.dll,generic-boxing.2.dll $(srcdir)/generic-box.2.cs