Author: lupus
Date: 2007-10-05 12:16:32 -0400 (Fri, 05 Oct 2007)
New Revision: 86997
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini-ppc.c
Log:
Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* mini-ppc.c: optimized the size of the IMT thunks a bit.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2007-10-05 16:09:05 UTC (rev 86996)
+++ trunk/mono/mono/mini/ChangeLog 2007-10-05 16:16:32 UTC (rev 86997)
@@ -1,4 +1,8 @@
+Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * mini-ppc.c: optimized the size of the IMT thunks a bit.
+
Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* mini-ppc.c: implemented fast delegate invocation.
Modified: trunk/mono/mono/mini/mini-ppc.c
===================================================================
--- trunk/mono/mono/mini/mini-ppc.c 2007-10-05 16:09:05 UTC (rev 86996)
+++ trunk/mono/mono/mini/mini-ppc.c 2007-10-05 16:16:32 UTC (rev 86997)
@@ -3994,7 +3994,7 @@
#define CMP_SIZE 12
#define BR_SIZE 4
-#define JUMP_IMM_SIZE 20
+#define JUMP_IMM_SIZE 12
#define ENABLE_WRONG_METHOD_CHECK 0
/*
@@ -4026,8 +4026,11 @@
}
size += item->chunk_size;
}
+ /* the initial load of the vtable address */
+ size += 8;
code = mono_code_manager_reserve (domain->code_mp, size);
start = code;
+ ppc_load (code, ppc_r11, (guint32)(& (vtable->vtable [0])));
for (i = 0; i < count; ++i) {
MonoIMTCheckItem *item = imt_entries [i];
item->code_target = code;
@@ -4039,8 +4042,7 @@
}
item->jmp_code = code;
ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
- ppc_load (code, ppc_r11, (guint32)(&
(vtable->vtable [item->vtable_slot])));
- ppc_lwz (code, ppc_r0, 0, ppc_r11);
+ ppc_lwz (code, ppc_r0, (sizeof (gpointer) *
item->vtable_slot), ppc_r11);
ppc_mtctr (code, ppc_r0);
ppc_bcctr (code, PPC_BR_ALWAYS, 0);
} else {
@@ -4051,8 +4053,7 @@
item->jmp_code = code;
ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
#endif
- ppc_load (code, ppc_r11, (guint32)(&
(vtable->vtable [item->vtable_slot])));
- ppc_lwz (code, ppc_r0, 0, ppc_r11);
+ ppc_lwz (code, ppc_r0, (sizeof (gpointer) *
item->vtable_slot), ppc_r11);
ppc_mtctr (code, ppc_r0);
ppc_bcctr (code, PPC_BR_ALWAYS, 0);
#if ENABLE_WRONG_METHOD_CHECK
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches