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]
Other format: [Raw text]

Re: Patch: enable interpreter on PPC64


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> I think so (am using similar change on gcc-3_2-rhl8-branch), but
Jakub> there is still the jc1 bug I told you about where DECL_EXTERNAL is
Jakub> not set on external methods which results in lots of ppc64 libjava
Jakub> make check failures.

Sorry for the long turnaround on this.  Could you try the appended?

This eliminates the problem you told me about.  The idea is to set
DECL_EXTERNAL if the function is in a class we aren't planning to
compile.

This doesn't seem to cause problems on x86.  I can't readily test
ppc64 in full due to lack of time (while writing the patch I just
built jc1 and I don't have a complete cross environment set up).

Andrew, for ppc64, we need to set DECL_EXTERNAL on a function decl for
functions not in the .o we are generating.  We have to generate
different code for such calls on this platform.

I'm going on vacation and when Jakub comes back, I'll be gone.  So if
either of the two of you want to take over this patch, that's fine by
me.  Otherwise I'll deal with it when I'm back.

Tom


Index: gcc/java/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* class.c (add_method_1): Set DECL_EXTERNAL on functions from
	classes not currently being compiled.

Index: gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.156
diff -u -r1.156 class.c
--- gcc/java/class.c 1 May 2003 16:13:35 -0000 1.156
+++ gcc/java/class.c 7 May 2003 21:18:57 -0000
@@ -622,6 +622,10 @@
   if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1;
   if (access_flags & ACC_TRANSIENT) METHOD_TRANSIENT (fndecl) = 1;
   if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1;
+
+  if (! CLASS_FROM_CURRENTLY_COMPILED_P(this_class))
+    DECL_EXTERNAL (fndecl) = 1;
+
   return fndecl;
 }
 


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