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>, "'Jeff Sturm '" <jsturm at one-point dot com>
- Subject: RE: Alignment problem with hashtable locks on PowerPC
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Sun, 11 Nov 2001 21:18:57 -0800
- Cc: "Boehm, Hans" <hans_boehm at hp dot com>, "'java-patches at gcc dot gnu dot org '" <java-patches at gcc dot gnu dot org>
That sounds basically right. There's some argument that ALIGN_DOUBLE should
be defined
by the gcj configuration scripts, and that gcconfig.h should set it only if
it's not already set, but required by the architecture. You may not want
doubleword alignment for gcj on an embedded platform that doesn't use hash
synchronization. You may also not want it for another (currently
hypothetical) client that happens to use gcj-style type information, but
doesn't use gcj-style hash synchronization. ALIGN_DOUBLE does cost some
space.
Having said that, I'm not sure whether PowerPC requires double-word
alignment for 64-bit data. If so, that should be fixed in gcconfig.h
anyway.
Hans
-----Original Message-----
From: Bryce McKinlay
To: Jeff Sturm
Cc: Boehm, Hans; java-patches@gcc.gnu.org
Sent: 11/11/01 2:40 PM
Subject: Re: Alignment problem with hashtable locks on PowerPC
Jeff Sturm wrote:
>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:
>
Oh, yeah looks like thats it - thanks! I'll test that out tonight.
regards
Bryce.