[RFC] m68k support for libjava
Roman Zippel
zippel@linux-m68k.org
Thu Sep 6 17:13:00 GMT 2007
Hi,
On Thu, 6 Sep 2007, Matthias Klose wrote:
> Tom Tromey schrieb:
> >>>>>> "Matthias" == Matthias Klose <doko@cs.tu-berlin.de> writes:
> >
> > Matthias> java support for m68k
> > Matthias> - add m68k info to configure files
> > Matthias> - add sysdep/m68k/locks.h
> > Matthias> - boehm.c: don't use bitmap as gc_descr if pointer is misaligned
> >
> > Someone other than me should review the locks.h addition.
> > The rest is ok with the appropriate ChangeLog entry.
>
> Andreas Schwab schrieb:
> > Tom Tromey <tromey@redhat.com> writes:
> >
> >>>>>>> "Matthias" == Matthias Klose <doko@cs.tu-berlin.de> writes:
> >> Matthias> java support for m68k
> >> Matthias> - add m68k info to configure files
> >> Matthias> - add sysdep/m68k/locks.h
> >> Matthias> - boehm.c: don't use bitmap as gc_descr if pointer is misaligned
> >>
> >> Someone other than me should review the locks.h addition.
> >
> > The m68k bits look ok to me.
>
> committed the attached patch to the trunk.
Sorry for not reacting earlier, I have a slightly improved patch for the
boehm.c part. The misaligned check can be moved down a little after we
know it's a reference.
bye, Roman
200x-xx-xx Roman Zippel <zippel@linux-m68k.org>
* boehm.c: Move misaligned pointer check after JREFERENCE_TYPE_P
test
---
gcc/java/boehm.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: gcc/gcc/java/boehm.c
===================================================================
--- gcc.orig/gcc/java/boehm.c
+++ gcc/gcc/java/boehm.c
@@ -98,13 +98,6 @@ mark_reference_fields (tree field,
offset = int_byte_position (field);
size_bytes = int_size_in_bytes (TREE_TYPE (field));
- if (offset % (POINTER_SIZE / BITS_PER_UNIT))
- {
- *all_bits_set = -1;
- *pointer_after_end = 1;
- break;
- }
-
if (JREFERENCE_TYPE_P (TREE_TYPE (field))
/* An `object' of type gnu.gcj.RawData is actually non-Java
data. */
@@ -118,6 +111,13 @@ mark_reference_fields (tree field,
we already covered, then we are doomed. */
gcc_assert (offset > *last_view_index);
+ if (offset % (POINTER_SIZE / BITS_PER_UNIT))
+ {
+ *all_bits_set = -1;
+ *pointer_after_end = 1;
+ break;
+ }
+
count = offset * BITS_PER_UNIT / POINTER_SIZE;
size_words = size_bytes * BITS_PER_UNIT / POINTER_SIZE;
More information about the Java-patches
mailing list