This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Alignment problem with hashtable locks on PowerPC
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Subject: Re: Alignment problem with hashtable locks on PowerPC
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Sun, 11 Nov 2001 10:03:12 -0500 (EST)
- Cc: "Boehm, Hans" <hans_boehm at hp dot com>, java-patches at gcc dot gnu dot org
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