This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Alignment problem with hashtable locks on PowerPC




On Mon, 12 Nov 2001, Bryce McKinlay wrote:
> At first I thought it was just the compiler not giving enough alignment 
> for statically allocated class objects, which I fixed by setting 
> TYPE_ALIGN for class_type_node in the compiler, but the GC also seems to 
> be returning objects that are only 32-bit aligned!

A guess... is the trouble that POWERPC doesn't define ALIGN_DOUBLE?  Do
we need something like the following:

Index: gc_priv.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gc_priv.h,v
retrieving revision 1.5
diff -u -p -r1.5 gc_priv.h
--- gc_priv.h   2001/10/23 00:28:56     1.5
+++ gc_priv.h   2001/11/11 14:50:01
@@ -205,6 +205,11 @@ typedef char * ptr_t;      /* A generic point
    /* odd numbered words to have mark bits.                            */
 #endif

+/* gcj requires objects aligned to a minimum of 8 bytes. */
+#if defined(GC_GCJ_SUPPORT) && ALIGNMENT < 8
+#  define ALIGN_DOUBLE
+#endif
+
 /* ALIGN_DOUBLE requires MERGE_SIZES at present. */
 # if defined(ALIGN_DOUBLE) && !defined(MERGE_SIZES)
 #   define MERGE_SIZES



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]