Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libgc
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2009-05-19 04:09:19 +0400
committerMiguel de Icaza <miguel@gnome.org>2009-05-19 04:09:19 +0400
commit1636d834a423759817b0a37e5aee67634ea52b9d (patch)
tree12d5bfd699364602eb36bcc67a6d10c0229ad1b5 /libgc
parent74712b87c158df51fc161466b3da8600d8c6a22b (diff)
2009-05-18 Miguel de Icaza <miguel@novell.com>
* include/private/gcconfig.h: Add support for Linux on the PS3 svn path=/trunk/mono/; revision=134354
Diffstat (limited to 'libgc')
-rw-r--r--libgc/ChangeLog4
-rw-r--r--libgc/include/private/gcconfig.h20
-rw-r--r--libgc/os_dep.c4
3 files changed, 26 insertions, 2 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog
index 32553f198d1..a54c000551c 100644
--- a/libgc/ChangeLog
+++ b/libgc/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-18 Miguel de Icaza <miguel@novell.com>
+
+ * include/private/gcconfig.h: Add support for Linux on the PS3
+
2009-04-28 Zoltan Varga <vargaz@gmail.com>
* misc.c (GC_init): Avoid casting an lvalue. Fixes part of #498692.
diff --git a/libgc/include/private/gcconfig.h b/libgc/include/private/gcconfig.h
index 519f831229d..58bbb525917 100644
--- a/libgc/include/private/gcconfig.h
+++ b/libgc/include/private/gcconfig.h
@@ -804,6 +804,7 @@
# define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
# define DATAEND /* not needed */
# endif
+
# ifdef LINUX
# if defined(__powerpc64__)
# define ALIGNMENT 8
@@ -882,6 +883,20 @@
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# endif
+# ifdef SN_TARGET_PS3
+# define NO_GETENV
+# define CPP_WORDSZ 32
+# define ALIGNMENT 4
+ extern int _end [];
+// extern int _dso_handle[];
+ extern int __bss;
+
+# define DATAEND (_end)
+# define DATASTART (__bss)
+# define HEURISTIC2
+# define USE_GENERIC_PUSHREGS
+# endif
+
# ifdef NOSYS
# define ALIGNMENT 4
# define OS_TYPE "NOSYS"
@@ -2368,8 +2383,13 @@
GC_amiga_get_mem((size_t)bytes + GC_page_size) \
+ GC_page_size-1)
# else
+# if defined(SN_TARGET_PS3)
+ extern void *ps3_get_mem (size_t size);
+# define GET_MEM(bytes) (struct hblk*) ps3_get_mem (bytes)
+# else
extern ptr_t GC_unix_get_mem();
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
+#endif
# endif
# endif
# endif
diff --git a/libgc/os_dep.c b/libgc/os_dep.c
index 83b166c44a9..5017bdc5e8a 100644
--- a/libgc/os_dep.c
+++ b/libgc/os_dep.c
@@ -54,7 +54,7 @@
# endif
# include <stdio.h>
-# if defined(MSWINCE)
+# if defined(MSWINCE) || defined (SN_TARGET_PS3)
# define SIGSEGV 0 /* value is irrelevant */
# else
# include <signal.h>
@@ -511,7 +511,7 @@ void GC_enable_signals(void)
# if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) \
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
- && !defined(NOSYS) && !defined(ECOS)
+ && !defined(NOSYS) && !defined(ECOS) && !defined(SN_TARGET_PS3)
# if defined(sigmask) && !defined(UTS4) && !defined(HURD)
/* Use the traditional BSD interface */