📄 gcconfig.h
字号:
# include <ia64intrin.h># define PREFETCH(x) \ __lfetch(__lfhint_none, (x))# define PREFETCH_FOR_WRITE(x) \ __lfetch(__lfhint_nta, (x))# define CLEAR_DOUBLE(x) \ __stf_spill((void *)(x), 0)# endif // __INTEL_COMPILER# endif# endif# ifdef MSWIN32 /* FIXME: This is a very partial guess. There is no port, yet. */# define OS_TYPE "MSWIN32" /* STACKBOTTOM and DATASTART are handled specially in */ /* os_dep.c. */# define DATAEND /* not needed */# if defined(_WIN64)# define CPP_WORDSZ 64# else# define CPP_WORDSZ 32 /* Is this possible? */# endif# define ALIGNMENT 8# endif# endif# ifdef M88K# define MACH_TYPE "M88K"# define ALIGNMENT 4# define ALIGN_DOUBLE extern int etext[];# ifdef CX_UX# define OS_TYPE "CX_UX"# define DATASTART ((((word)etext + 0x3fffff) & ~0x3fffff) + 0x10000)# endif# ifdef DGUX# define OS_TYPE "DGUX" extern ptr_t GC_SysVGetDataStart();# define DATASTART GC_SysVGetDataStart(0x10000, etext)# endif# define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */# endif# ifdef S370 /* If this still works, and if anyone cares, this should probably */ /* be moved to the S390 category. */# define MACH_TYPE "S370"# define ALIGNMENT 4 /* Required by hardware */# define USE_GENERIC_PUSH_REGS# ifdef UTS4# define OS_TYPE "UTS4" extern int etext[]; extern int _etext[]; extern int _end[]; extern ptr_t GC_SysVGetDataStart();# define DATASTART GC_SysVGetDataStart(0x10000, _etext)# define DATAEND (_end)# define HEURISTIC2# endif# endif# ifdef S390# define MACH_TYPE "S390"# define USE_GENERIC_PUSH_REGS# ifndef __s390x__# define ALIGNMENT 4# define CPP_WORDSZ 32# else# define ALIGNMENT 8# define CPP_WORDSZ 64# define HBLKSIZE 4096# endif# ifdef LINUX# define OS_TYPE "LINUX"# define LINUX_STACKBOTTOM# define DYNAMIC_LOADING extern int __data_start[];# define DATASTART ((ptr_t)(__data_start)) extern int _end[];# define DATAEND (_end)# define CACHE_LINE_SIZE 256# define GETPAGESIZE() 4096# endif# endif# if defined(PJ)# define ALIGNMENT 4 extern int _etext[];# define DATASTART ((ptr_t)(_etext))# define HEURISTIC1# endif# ifdef ARM32# define CPP_WORDSZ 32# define MACH_TYPE "ARM32"# define ALIGNMENT 4# ifdef NETBSD# define OS_TYPE "NETBSD"# define HEURISTIC2# ifdef __ELF__# define DATASTART GC_data_start# define DYNAMIC_LOADING# else extern char etext[];# define DATASTART ((ptr_t)(etext))# endif# define USE_GENERIC_PUSH_REGS# endif# ifdef LINUX# define OS_TYPE "LINUX"# define LINUX_STACKBOTTOM# undef STACK_GRAN# define STACK_GRAN 0x10000000# define USE_GENERIC_PUSH_REGS# ifdef __ELF__# define DYNAMIC_LOADING# include <features.h># if defined(__GLIBC__) && __GLIBC__ >= 2# define SEARCH_FOR_DATA_START# else extern char **__environ;# define DATASTART ((ptr_t)(&__environ)) /* hideous kludge: __environ is the first */ /* word in crt0.o, and delimits the start */ /* of the data segment, no matter which */ /* ld options were passed through. */ /* We could use _etext instead, but that */ /* would include .rodata, which may */ /* contain large read-only data tables */ /* that we'd rather not scan. */# endif extern int _end[];# define DATAEND (_end)# else extern int etext[];# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))# endif# endif# ifdef MSWINCE# define OS_TYPE "MSWINCE"# define DATAEND /* not needed */# endif# ifdef NOSYS /* __data_start is usually defined in the target linker script. */ extern int __data_start[];# define DATASTART (ptr_t)(__data_start)# define USE_GENERIC_PUSH_REGS /* __stack_base__ is set in newlib/libc/sys/arm/crt0.S */ extern void *__stack_base__;# define STACKBOTTOM ((ptr_t) (__stack_base__))# endif#endif# ifdef CRIS# define MACH_TYPE "CRIS"# define CPP_WORDSZ 32# define ALIGNMENT 1# define OS_TYPE "LINUX"# define DYNAMIC_LOADING# define LINUX_STACKBOTTOM# define USE_GENERIC_PUSH_REGS# define SEARCH_FOR_DATA_START extern int _end[];# define DATAEND (_end)# endif# ifdef SH# define MACH_TYPE "SH"# define ALIGNMENT 4# ifdef MSWINCE# define OS_TYPE "MSWINCE"# define DATAEND /* not needed */# endif# ifdef LINUX# define OS_TYPE "LINUX"# define LINUX_STACKBOTTOM# define USE_GENERIC_PUSH_REGS# define DYNAMIC_LOADING# define SEARCH_FOR_DATA_START extern int _end[];# define DATAEND (_end)# endif# endif # ifdef SH4# define MACH_TYPE "SH4"# define OS_TYPE "MSWINCE"# define ALIGNMENT 4# define DATAEND /* not needed */# endif# ifdef M32R# define CPP_WORDSZ 32# define MACH_TYPE "M32R"# define ALIGNMENT 4# ifdef LINUX# define OS_TYPE "LINUX"# define LINUX_STACKBOTTOM# undef STACK_GRAN# define STACK_GRAN 0x10000000# define USE_GENERIC_PUSH_REGS# define DYNAMIC_LOADING# define SEARCH_FOR_DATA_START extern int _end[];# define DATAEND (_end)# endif# endif# ifdef X86_64# define MACH_TYPE "X86_64"# define ALIGNMENT 8# define CPP_WORDSZ 64# ifndef HBLKSIZE# define HBLKSIZE 4096# endif# define CACHE_LINE_SIZE 64# define USE_GENERIC_PUSH_REGS# ifdef LINUX# define OS_TYPE "LINUX"# define LINUX_STACKBOTTOM# if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC)# define MPROTECT_VDB# else /* We seem to get random errors in incremental mode, */ /* possibly because Linux threads is itself a malloc client */ /* and can't deal with the signals. */# endif# ifdef __ELF__# define DYNAMIC_LOADING# ifdef UNDEFINED /* includes ro data */ extern int _etext[];# define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))# endif# include <features.h># define SEARCH_FOR_DATA_START extern int _end[];# define DATAEND (_end)# else extern int etext[];# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))# endif# if defined(__GNUC__) && __GNUC >= 3# define PREFETCH(x) __builtin_prefetch((x), 0, 0)# define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)# endif# endif# ifdef NETBSD# define OS_TYPE "NETBSD"# ifdef __ELF__# define DYNAMIC_LOADING# endif# define HEURISTIC2 extern char etext[];# define SEARCH_FOR_DATA_START# endif# endif#if defined(LINUX) && defined(USE_MMAP) /* The kernel may do a somewhat better job merging mappings etc. */ /* with anonymous mappings. */# define USE_MMAP_ANON#endif#if defined(LINUX) && defined(REDIRECT_MALLOC) /* Rld appears to allocate some memory with its own allocator, and */ /* some through malloc, which might be redirected. To make this */ /* work with collectable memory, we have to scan memory allocated */ /* by rld's internal malloc. */# define USE_PROC_FOR_LIBRARIES#endif # ifndef STACK_GROWS_UP# define STACK_GROWS_DOWN# endif# ifndef CPP_WORDSZ# define CPP_WORDSZ 32# endif# ifndef OS_TYPE# define OS_TYPE ""# endif# ifndef DATAEND extern int end[];# define DATAEND (end)# endif# if defined(SVR4) && !defined(GETPAGESIZE)# include <unistd.h># define GETPAGESIZE() sysconf(_SC_PAGESIZE)# endif# ifndef GETPAGESIZE# if defined(SUNOS5) || defined(IRIX5)# include <unistd.h># endif# define GETPAGESIZE() getpagesize()# endif# if defined(SUNOS5) || defined(DRSNX) || defined(UTS4) /* OS has SVR4 generic features. Probably others also qualify. */# define SVR4# endif# if defined(SUNOS5) || defined(DRSNX) /* OS has SUNOS5 style semi-undocumented interface to dynamic */ /* loader. */# define SUNOS5DL /* OS has SUNOS5 style signal handlers. */# define SUNOS5SIGS# endif# if defined(HPUX)# define SUNOS5SIGS# endif# if defined(FREEBSD) && (__FreeBSD__ >= 4)# define SUNOS5SIGS# endif# if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \ || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \ || defined(DGUX) || defined(BSD) || defined(SUNOS4) \ || defined(_AIX) || defined(DARWIN) || defined(OSF1)# define UNIX_LIKE /* Basic Unix-like system calls work. */# endif# if CPP_WORDSZ != 32 && CPP_WORDSZ != 64 -> bad word size# endif# ifdef PCR# undef DYNAMIC_LOADING# undef STACKBOTTOM# undef HEURISTIC1# undef HEURISTIC2# undef PROC_VDB# undef MPROTECT_VDB# define PCR_VDB# endif# ifdef SRC_M3 /* Postponed for now. */# undef PROC_VDB# undef MPROTECT_VDB# endif# ifdef SMALL_CONFIG /* Presumably not worth the space it takes. */# undef PROC_VDB# undef MPROTECT_VDB# endif# ifdef USE_MUNMAP# undef MPROTECT_VDB /* Can't deal with address space holes. */# endif# ifdef PARALLEL_MARK# undef MPROTECT_VDB /* For now. */# endif# if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB)# define DEFAULT_VDB# endif# ifndef PREFETCH# define PREFETCH(x)# define NO_PREFETCH# endif# ifndef PREFETCH_FOR_WRITE# define PREFETCH_FOR_WRITE(x)# define NO_PREFETCH_FOR_WRITE# endif# ifndef CACHE_LINE_SIZE# define CACHE_LINE_SIZE 32 /* Wild guess */# endif# ifdef LINUX# define REGISTER_LIBRARIES_EARLY /* We sometimes use dl_iterate_phdr, which may acquire an internal */ /* lock. This isn't safe after the world has stopped. So we must */ /* call GC_register_dynamic_libraries before stopping the world. */ /* For performance reasons, this may be beneficial on other */ /* platforms as well, though it should be avoided in win32. */# endif /* LINUX */# if defined(SEARCH_FOR_DATA_START) extern ptr_t GC_data_start;# define DATASTART GC_data_start# endif# ifndef CLEAR_DOUBLE# define CLEAR_DOUBLE(x) \ ((word*)x)[0] = 0; \ ((word*)x)[1] = 0;# endif /* CLEAR_DOUBLE */ /* Internally we use GC_SOLARIS_THREADS to test for either old or pthreads. */# if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS)# define GC_SOLARIS_THREADS# endif# if defined(GC_IRIX_THREADS) && !defined(IRIX5) --> inconsistent configuration# endif# if defined(GC_LINUX_THREADS) && !defined(LINUX) --> inconsistent configuration# endif# if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5) --> inconsistent configuration# endif# if defined(GC_HPUX_THREADS) && !defined(HPUX) --> inconsistent configuration# endif# if defined(GC_AIX_THREADS) && !defined(_AIX) --> inconsistent configuration# endif# if defi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -