Author: zoltan
Date: 2005-04-09 15:38:42 -0400 (Sat, 09 Apr 2005)
New Revision: 42741
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/exceptions-amd64.c
trunk/mono/mono/mini/mini-amd64.c
trunk/mono/mono/mini/mini-amd64.h
Log:
2005-04-09 Zoltan Varga <[EMAIL PROTECTED]>
* exceptions-amd64.c (get_throw_trampoline): Align stack.
* exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
body since this is not used on amd64.
* mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate
define.
* mini-amd64.c: Remove obsolete fixmes.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2005-04-09 19:36:12 UTC (rev 42740)
+++ trunk/mono/mono/mini/ChangeLog 2005-04-09 19:38:42 UTC (rev 42741)
@@ -1,5 +1,14 @@
2005-04-09 Zoltan Varga <[EMAIL PROTECTED]>
+ * exceptions-amd64.c (get_throw_trampoline): Align stack.
+
+ * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
+ body since this is not used on amd64.
+
+ * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate
define.
+
+ * mini-amd64.c: Remove obsolete fixmes.
+
* mini.c (print_method_from_ip): Fix debugging support.
2005-2-1 Massimiliano Mantione <[EMAIL PROTECTED]>
Modified: trunk/mono/mono/mini/exceptions-amd64.c
===================================================================
--- trunk/mono/mono/mini/exceptions-amd64.c 2005-04-09 19:36:12 UTC (rev
42740)
+++ trunk/mono/mono/mini/exceptions-amd64.c 2005-04-09 19:38:42 UTC (rev
42741)
@@ -298,6 +298,8 @@
amd64_mov_reg_reg (code, AMD64_RCX, AMD64_RBX, 8);
amd64_mov_reg_reg (code, AMD64_R8, AMD64_RBP, 8);
amd64_mov_reg_reg (code, AMD64_R9, AMD64_R12, 8);
+ /* align stack */
+ amd64_push_imm (code, 0);
/* reverse order */
amd64_push_imm (code, rethrow);
amd64_push_reg (code, AMD64_R15);
@@ -353,57 +355,12 @@
return start;
}
-/**
- * mono_arch_get_throw_exception_by_name:
- *
- * Returns a function pointer which can be used to raise
- * corlib exceptions. The returned function has the following
- * signature: void (*func) (char *exc_name);
- */
gpointer
mono_arch_get_throw_exception_by_name (void)
{
- static guint8* start;
- static gboolean inited = FALSE;
- guint8 *code;
- guint64 throw_ex;
+ g_assert_not_reached ();
- if (inited)
- return start;
-
- start = code = mono_global_codeman_reserve (64);
-
- code = start;
-
- /* Push return address */
- amd64_push_reg (code, AMD64_RSI);
-
- /* Call exception_from_name */
- amd64_mov_reg_reg (code, AMD64_RDX, AMD64_RDI, 8);
- amd64_mov_reg_imm (code, AMD64_RSI, "System");
- amd64_mov_reg_imm (code, AMD64_RDI,
mono_defaults.exception_class->image);
-
- amd64_mov_reg_imm (code, AMD64_R11, mono_exception_from_name);
- amd64_call_reg (code, AMD64_R11);
-
- /* Put the original return address at the top of the misaligned stack */
- amd64_pop_reg (code, AMD64_RSI);
- amd64_push_reg (code, AMD64_R11);
- amd64_push_reg (code, AMD64_RSI);
-
- throw_ex = (guint64)mono_arch_get_throw_exception ();
-
- /* Call throw_exception */
- amd64_mov_reg_reg (code, AMD64_RDI, AMD64_RAX, 8);
- amd64_mov_reg_imm (code, AMD64_R11, throw_ex);
- /* The original IP is on the stack */
- amd64_jump_reg (code, AMD64_R11);
-
- g_assert ((code - start) < 64);
-
- inited = TRUE;
-
- return start;
+ return NULL;
}
/**
Modified: trunk/mono/mono/mini/mini-amd64.c
===================================================================
--- trunk/mono/mono/mini/mini-amd64.c 2005-04-09 19:36:12 UTC (rev 42740)
+++ trunk/mono/mono/mini/mini-amd64.c 2005-04-09 19:38:42 UTC (rev 42741)
@@ -63,15 +63,6 @@
*/
/*
- * FIXME:
- * - Use xmm registers instead of the x87 stack
- * - Allocate arguments to global registers
- * - implement emulated opcodes
- * - (all archs) do not store trampoline addresses in method->info since they
- * are domain specific.
- */
-
-/*
* Floating point comparison results:
* ZF PF CF
* A > B 0 0 0
Modified: trunk/mono/mono/mini/mini-amd64.h
===================================================================
--- trunk/mono/mono/mini/mini-amd64.h 2005-04-09 19:36:12 UTC (rev 42740)
+++ trunk/mono/mono/mini/mini-amd64.h 2005-04-09 19:38:42 UTC (rev 42741)
@@ -73,9 +73,6 @@
};
#endif // sun, Solaris x86
-/* Enables OP_LSHL, OP_LSHL_IMM, OP_LSHR, OP_LSHR_IMM, OP_LSHR_UN,
OP_LSHR_UN_IMM */
-#define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
-
#define MONO_MAX_IREGS 16
#define MONO_MAX_FREGS AMD64_XMM_NREG
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches