< prev index next >

src/os/linux/vm/os_linux.cpp

Print this page
rev 12087 : 8166560: [s390] Basic enablement of s390 port.

*** 289,299 **** // The linker uses the following search paths to locate required // shared libraries: // 1: ... // ... // 7: The default directories, normally /lib and /usr/lib. ! #if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390)) #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" #else #define DEFAULT_LIBPATH "/lib:/usr/lib" #endif --- 289,299 ---- // The linker uses the following search paths to locate required // shared libraries: // 1: ... // ... // 7: The default directories, normally /lib and /usr/lib. ! #if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390) #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" #else #define DEFAULT_LIBPATH "/lib:/usr/lib" #endif
*** 1210,1221 **** warning("No monotonic clock was available - timed services may " \ "be adversely affected if the time-of-day clock changes"); } #ifndef SYS_clock_getres ! #if defined(IA32) || defined(AMD64) ! #define SYS_clock_getres IA32_ONLY(266) AMD64_ONLY(229) #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) #else #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" #define sys_clock_getres(x,y) -1 #endif --- 1210,1221 ---- warning("No monotonic clock was available - timed services may " \ "be adversely affected if the time-of-day clock changes"); } #ifndef SYS_clock_getres ! #if defined(X86) || defined(PPC64) || defined(S390) ! #define SYS_clock_getres AMD64_ONLY(229) IA32_ONLY(266) PPC64_ONLY(247) S390_ONLY(261) #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) #else #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time" #define sys_clock_getres(x,y) -1 #endif
*** 1764,1774 **** static Elf32_Half running_arch_code=EM_SPARC; #elif (defined __powerpc64__) static Elf32_Half running_arch_code=EM_PPC64; #elif (defined __powerpc__) static Elf32_Half running_arch_code=EM_PPC; ! #elif (defined ARM) static Elf32_Half running_arch_code=EM_ARM; #elif (defined S390) static Elf32_Half running_arch_code=EM_S390; #elif (defined ALPHA) static Elf32_Half running_arch_code=EM_ALPHA; --- 1764,1774 ---- static Elf32_Half running_arch_code=EM_SPARC; #elif (defined __powerpc64__) static Elf32_Half running_arch_code=EM_PPC64; #elif (defined __powerpc__) static Elf32_Half running_arch_code=EM_PPC; ! #elif (defined ARM) // ARM must come before AARCH64 because the closed 64-bit port requires so. static Elf32_Half running_arch_code=EM_ARM; #elif (defined S390) static Elf32_Half running_arch_code=EM_S390; #elif (defined ALPHA) static Elf32_Half running_arch_code=EM_ALPHA;
*** 1782,1792 **** static Elf32_Half running_arch_code=EM_68K; #elif (defined AARCH64) static Elf32_Half running_arch_code=EM_AARCH64; #else #error Method os::dll_load requires that one of following is defined:\ ! IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64 #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures --- 1782,1792 ---- static Elf32_Half running_arch_code=EM_68K; #elif (defined AARCH64) static Elf32_Half running_arch_code=EM_AARCH64; #else #error Method os::dll_load requires that one of following is defined:\ ! AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, S390, __sparc #endif // Identify compatability class for VM's architecture and library's architecture // Obtain string descriptions for architectures
*** 2190,2203 **** } } #if defined(AMD64) || defined(IA32) || defined(X32) const char* search_string = "model name"; - #elif defined(SPARC) - const char* search_string = "cpu"; #elif defined(PPC64) const char* search_string = "cpu"; #else const char* search_string = "Processor"; #endif // Parses the cpuinfo file for string representing the model name. --- 2190,2205 ---- } } #if defined(AMD64) || defined(IA32) || defined(X32) const char* search_string = "model name"; #elif defined(PPC64) const char* search_string = "cpu"; + #elif defined(S390) + const char* search_string = "processor"; + #elif defined(SPARC) + const char* search_string = "cpu"; #else const char* search_string = "Processor"; #endif // Parses the cpuinfo file for string representing the model name.
*** 2231,2254 **** } fclose(fp); } // cpuinfo not found or parsing failed, just print generic string. The entire // /proc/cpuinfo file will be printed later in the file (or enough of it for x86) ! #if defined(AMD64) strncpy(cpuinfo, "x86_64", length); #elif defined(IA32) strncpy(cpuinfo, "x86_32", length); #elif defined(IA64) strncpy(cpuinfo, "IA64", length); - #elif defined(SPARC) - strncpy(cpuinfo, "sparcv9", length); - #elif defined(AARCH64) - strncpy(cpuinfo, "AArch64", length); - #elif defined(ARM) - strncpy(cpuinfo, "ARM", length); #elif defined(PPC) strncpy(cpuinfo, "PPC64", length); #elif defined(ZERO_LIBARCH) strncpy(cpuinfo, ZERO_LIBARCH, length); #else strncpy(cpuinfo, "unknown", length); #endif --- 2233,2258 ---- } fclose(fp); } // cpuinfo not found or parsing failed, just print generic string. The entire // /proc/cpuinfo file will be printed later in the file (or enough of it for x86) ! #if defined(AARCH64) ! strncpy(cpuinfo, "AArch64", length); ! #elif defined(AMD64) strncpy(cpuinfo, "x86_64", length); + #elif defined(ARM) // Order wrt. AARCH64 is relevant! + strncpy(cpuinfo, "ARM", length); #elif defined(IA32) strncpy(cpuinfo, "x86_32", length); #elif defined(IA64) strncpy(cpuinfo, "IA64", length); #elif defined(PPC) strncpy(cpuinfo, "PPC64", length); + #elif defined(S390) + strncpy(cpuinfo, "S390", length); + #elif defined(SPARC) + strncpy(cpuinfo, "sparcv9", length); #elif defined(ZERO_LIBARCH) strncpy(cpuinfo, ZERO_LIBARCH, length); #else strncpy(cpuinfo, "unknown", length); #endif
*** 3240,3251 **** // If we can't determine the value (e.g. /proc is not mounted, or the text // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO ! large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ! ARM32_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) { --- 3244,3262 ---- // If we can't determine the value (e.g. /proc is not mounted, or the text // format has been changed), we'll use the largest page size supported by // the processor. #ifndef ZERO ! large_page_size = ! AARCH64_ONLY(2 * M) ! AMD64_ONLY(2 * M) ! ARM32_ONLY(2 * M) ! IA32_ONLY(4 * M) ! IA64_ONLY(256 * M) ! PPC_ONLY(4 * M) ! S390_ONLY(1 * M) ! SPARC_ONLY(4 * M); #endif // ZERO FILE *fp = fopen("/proc/meminfo", "r"); if (fp) { while (!feof(fp)) {
< prev index next >