Author: zoltan
Date: 2007-08-27 16:02:12 -0400 (Mon, 27 Aug 2007)
New Revision: 84915
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/class.c
Log:
2007-08-27 Zoltan Varga <[EMAIL PROTECTED]>
* class.c (mono_class_layout_fields): Only do the struct alignment hack
on
platforms which need it.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-08-27 19:41:30 UTC (rev 84914)
+++ trunk/mono/mono/metadata/ChangeLog 2007-08-27 20:02:12 UTC (rev 84915)
@@ -1,4 +1,8 @@
+2007-08-27 Zoltan Varga <[EMAIL PROTECTED]>
+ * class.c (mono_class_layout_fields): Only do the struct alignment hack
on
+ platforms which need it.
+
Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* sgen-gc.c: unregister thread data structures with a pthread_key_t
Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c 2007-08-27 19:41:30 UTC (rev 84914)
+++ trunk/mono/mono/metadata/class.c 2007-08-27 20:02:12 UTC (rev 84915)
@@ -1201,15 +1201,18 @@
break;
}
+#if NO_UNALIGNED_ACCESS
if (layout != TYPE_ATTRIBUTE_EXPLICIT_LAYOUT) {
/*
* For small structs, set min_align to at least the struct
size, since the
* JIT memset/memcpy code assumes this and generates unaligned
accesses
* otherwise. See #78990 for a testcase.
+ * FIXME: Fix the memset/memcpy code instead.
*/
if (class->instance_size <= sizeof (MonoObject) + sizeof
(gpointer))
class->min_align = MAX (class->min_align,
class->instance_size - sizeof (MonoObject));
}
+#endif
class->size_inited = 1;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches