MIPS patches applied from Thiemo Seufer. These are also already
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 5 Jun 2008 15:39:45 +0000 (17:39 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 5 Jun 2008 15:39:45 +0000 (17:39 +0200)
applied to bdwgc CVS.

* src/mm/boehm-gc/include/private/gcconfig.h,
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h,
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am,
src/mm/boehm-gc/mach_dep.c: Patched.

src/mm/boehm-gc/include/private/gcconfig.h
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am
src/mm/boehm-gc/mach_dep.c

index 6168e3d6534ca2f0571ac4732ff5f3c24043260d..8e77c48a860031ff15eb5433abaf04caa767e8e5 100644 (file)
 # ifdef MIPS
 #   define MACH_TYPE "MIPS"
 #   ifdef LINUX
-      /* This was developed for a linuxce style platform.  Probably    */
-      /* needs to be tweaked for workstation class machines.           */
 #     define OS_TYPE "LINUX"
 #     define DYNAMIC_LOADING
       extern int _end[];
 #     define DATAEND (_end)
       extern int __data_start[];
 #     define DATASTART ((ptr_t)(__data_start))
-#     ifdef _MIPS_SZPTR
-#      define CPP_WORDSZ _MIPS_SZPTR
-#      define ALIGNMENT (_MIPS_SZPTR/8)
-#     else
-#      define ALIGNMENT 4
-#     endif
+#     define CPP_WORDSZ _MIPS_SZPTR
+#     define ALIGNMENT (_MIPS_SZPTR/8)
 #     if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
-#        define LINUX_STACKBOTTOM
+#       define LINUX_STACKBOTTOM
 #     else
-#        define STACKBOTTOM 0x80000000
+#       define STACKBOTTOM ((ptr_t)0x7fff8000)
 #     endif
 #   endif /* Linux */
 #   ifdef EWS4800
index e1b40ca8838824815187b689d6d5b62cb6d6f7a2..a34ebc2887dafc28c9d5114f90dcbaaddd5a8d96 100755 (executable)
 # if defined(__cris__) || defined(CRIS)
 #   include "atomic_ops/sysdeps/gcc/cris.h"
 # endif
+# if defined(__mips__)
+#   include "atomic_ops/sysdeps/gcc/mips.h"
+# endif /* __mips__ */
 #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
 
 #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
index 8204d8d20c6817e7faf8166960294441fd6836c3..f47f8120c9025580c9b67cece4547e2765c06140 100644 (file)
@@ -27,7 +27,7 @@ nobase_sysdep_HEADERS= generic_pthread.h \
          gcc/alpha.h gcc/arm.h gcc/x86.h \
          gcc/hppa.h gcc/ia64.h \
          gcc/powerpc.h gcc/sparc.h \
-         gcc/hppa.h gcc/m68k.h gcc/s390.h \
+         gcc/hppa.h gcc/m68k.h gcc/mips.h gcc/s390.h \
          gcc/ia64.h gcc/x86_64.h gcc/cris.h \
        \
          icc/ia64.h \
index b9a4d1f12ca670b972fdf845ed81e5837e626257..b6e8ab99ec9f81f588a170d058d3f07f80921284 100644 (file)
@@ -178,7 +178,7 @@ void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
 #   if defined(HAVE_PUSH_REGS)
       GC_push_regs();
 #   elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) && \
-        !defined(HURD)
+        !defined(MIPS) && !defined(HURD)
       /* Older versions of Darwin seem to lack getcontext(). */
       /* ARM Linux often doesn't support a real getcontext(). */
       ucontext_t ctxt;