summaryrefslogtreecommitdiff
path: root/include/private/gcconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/gcconfig.h')
-rw-r--r--include/private/gcconfig.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 7c6977c3..6ddc98ef 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -109,8 +109,9 @@
/* And one for FreeBSD: */
# if (defined(__FreeBSD__) || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
-# define FREEBSD
+ || defined(__FreeBSD_kernel__)) && !defined(FREEBSD) \
+ && !defined(SN_TARGET_ORBIS) /* Orbis compiler defines __FreeBSD__ */
+# define FREEBSD
# endif
/* And one for Darwin: */
@@ -144,7 +145,8 @@
# elif !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) \
&& !defined(OPENBSD) && !defined(DARWIN) && !defined(_WIN32) \
&& !defined(__CEGCC__) && !defined(NN_PLATFORM_CTR) \
- && !defined(NN_BUILD_TARGET_PLATFORM_NX) && !defined(SYMBIAN)
+ && !defined(NN_BUILD_TARGET_PLATFORM_NX) \
+ && !defined(SN_TARGET_ORBIS) && !defined(SYMBIAN)
# define NOSYS
# define mach_type_known
# endif
@@ -454,7 +456,8 @@
# define I386
# define mach_type_known
# endif
-# if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__))
+# if (defined(FREEBSD) || defined(SN_TARGET_ORBIS)) \
+ && (defined(__amd64__) || defined(__x86_64__))
# define X86_64
# define mach_type_known
# endif
@@ -2449,7 +2452,16 @@
# ifndef HBLKSIZE
# define HBLKSIZE 4096
# endif
-# define CACHE_LINE_SIZE 64
+# ifndef CACHE_LINE_SIZE
+# define CACHE_LINE_SIZE 64
+# endif
+# ifdef SN_TARGET_ORBIS
+# define DATASTART (ptr_t)ALIGNMENT
+# define DATAEND (ptr_t)ALIGNMENT
+# include <pthread.h>
+ void *ps4_get_stack_bottom(void);
+# define STACKBOTTOM ((ptr_t)ps4_get_stack_bottom())
+# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define ELF_CLASS ELFCLASS64
@@ -2899,7 +2911,7 @@
/* not have a virtual paging system, so it does not have a large */
/* virtual address space that a standard x64 platform has. */
#if defined(USE_MUNMAP) && !defined(MUNMAP_THRESHOLD) \
- && defined(SN_TARGET_PS3)
+ && (defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3))
# define MUNMAP_THRESHOLD 2
#endif
@@ -3064,7 +3076,7 @@
#if defined(PCR) || defined(GC_WIN32_THREADS) || defined(GC_PTHREADS) \
|| defined(NN_PLATFORM_CTR) || defined(NINTENDO_SWITCH) \
- || defined(SN_TARGET_PS3)
+ || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3)
# define THREADS
#endif
@@ -3152,7 +3164,7 @@
#endif
#if defined(CAN_HANDLE_FORK) && !defined(CAN_CALL_ATFORK) \
- && !defined(HURD) && !defined(HOST_TIZEN) \
+ && !defined(HURD) && !defined(SN_TARGET_ORBIS) && !defined(HOST_TIZEN) \
&& (!defined(HOST_ANDROID) || __ANDROID_API__ >= 21)
/* Have working pthread_atfork(). */
# define CAN_CALL_ATFORK
@@ -3383,6 +3395,9 @@
SIZET_SAT_ADD(bytes, \
GC_page_size)) \
+ GC_page_size-1)
+# elif defined(SN_TARGET_ORBIS)
+ void *ps4_get_mem(size_t bytes);
+# define GET_MEM(bytes) (struct hblk*)ps4_get_mem(bytes)
# elif defined(SN_TARGET_PS3)
void *ps3_get_mem(size_t bytes);
# define GET_MEM(bytes) (struct hblk*)ps3_get_mem(bytes)