changeset 2997:8ffc52aa2e4d

PR1378: Add AArch64 support to Zero
author andrew
date Wed, 17 Apr 2013 21:26:58 +0100
parents 04c3fb903cf3
children 0d81d5904952
files src/os/linux/vm/os_linux.cpp
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp	Tue May 28 19:43:58 2013 +0200
+++ b/src/os/linux/vm/os_linux.cpp	Wed Apr 17 21:26:58 2013 +0100
@@ -132,6 +132,11 @@
 #define SEC_IN_NANOSECS  1000000000LL
 
 #define LARGEPAGES_BIT (1 << 6)
+
+#ifndef EM_AARCH64
+#define EM_AARCH64	183		/* ARM AARCH64 */
+#endif
+
 ////////////////////////////////////////////////////////////////////////////////
 // global variables
 julong os::Linux::_physical_memory = 0;
@@ -1893,7 +1898,8 @@
     {EM_MIPS,        EM_MIPS,    ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
     {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
-    {EM_SH,          EM_SH,      ELFCLASS32, ELFDATA2LSB, (char*)"SH"} /* Support little endian only*/
+    {EM_SH,          EM_SH,      ELFCLASS32, ELFDATA2LSB, (char*)"SH"}, /* Support little endian only*/
+    {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"} /* Support little endian only*/
   };
 
   #if  (defined IA32)
@@ -1926,6 +1932,8 @@
     static  Elf32_Half running_arch_code=EM_68K;
   #elif  (defined SH)
     static  Elf32_Half running_arch_code=EM_SH;
+  #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, SH