>>>>> "Joern" == Joern Rennecke <amyl...@spamcop.net> writes:

Joern> This is basically the same patch as posted before in
Joern> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02772.html and updated in
Joern> http://gcc.gnu.org/viewcvs?view=revision&revision=168273, but with a
Joern> few merge conflicts in current mainline resolved.

Joern>  * java-tree.h (JAVA_POINTER_SIZE): Define.
Joern>  * class.c (make_class_data): Use JAVA_POINTER_SIZE.
Joern>  (emit_register_classes): Likewise.
Joern>  * jcf-parse.c (handle_long_constant): Likewise.
Joern>  * constants.c (build_constants_constructor): Likewise.
Joern>  * builtins.c (UNMARSHAL3, UNMARSHAL4, UNMARSHAL5): Likewise.
Joern>  (compareAndSwapObject_builtin): Likewise.
Joern>  * boehm.c (get_boehm_type_descriptor): Likewise.
Joern>  (mark_reference_fields): Add log2_size parameter.  Changed all callers.
Joern> gcc/cp:

One question about the Java parts...

Joern> -          if (offset % (HOST_WIDE_INT) (POINTER_SIZE / BITS_PER_UNIT))
Joern> +          if (offset & ((1 << log2_size) - 1))

I think this has to be '(((HOST_WIDE_INT) 1) << log2_size) - 1'.
Otherwise it seems like this could overflow.

The rest of the java parts are ok.

Tom

Reply via email to