boehm gc changes for pj port

Anthony Green green@cygnus.com
Sat Oct 2 08:51:00 GMT 1999


I am committing the following changes to enable the picojava port.  I
will also forward them to Boehm.

1999-09-29  Steve Chamberlain  <sac@pobox.com>

        * config.h: Added picoJava target.
        * mach_dep.h (GC_push_regs):  New code for picoJava.

Index: config.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/config.h,v
retrieving revision 1.6
diff -u -r1.6 config.h
--- config.h	1999/07/19 19:27:56	1.6
+++ config.h	1999/10/02 15:47:58
@@ -235,6 +235,10 @@
 #   endif
 #   define mach_type_known
 # endif
+# if defined(__pj__)
+#   define PJ
+#   define mach_type_known
+# endif
 
 /* Feel free to add more clauses here */
 
@@ -983,6 +987,13 @@
 #   define SAVE_CALL_CHAIN
 #   define ASM_CLEAR_CODE	/* Stack clearing is crucial, and we 	*/
 				/* include assembly code to do it well.	*/
+# endif
+
+# if defined(PJ)
+#   define ALIGNMENT 4
+    extern int _etext;
+#   define DATASTART ((ptr_t)(&_etext))
+#   define HEURISTIC1
 # endif
 
 # endif
Index: mach_dep.c
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/mach_dep.c,v
retrieving revision 1.3
diff -u -r1.3 mach_dep.c
--- mach_dep.c	1999/06/30 12:43:56	1.3
+++ mach_dep.c	1999/10/02 15:47:58
@@ -327,12 +327,19 @@
 	    GC_push_all_stack((ptr_t)regs, lim);
 	}
 #     endif
+#     if defined(PJ)
+	{
+	    register int * sp asm ("optop");
+	    extern int *__libc_stack_end;
 
+	    GC_push_all_stack (sp, __libc_stack_end);
+        }
+#     endif
       /* other machines... */
 #       if !(defined M68K) && !(defined VAX) && !(defined RT) 
 #	if !(defined SPARC) && !(defined I386) && !(defined NS32K)
 #	if !defined(HP_PA) && !defined(M88K) && !defined(POWERPC)
-#	if !defined(UTS4)
+#	if !defined(UTS4) && !defined(PJ)
 	    --> bad news <--
 # 	endif
 #       endif

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California


More information about the Java-patches mailing list