Skip to content

Commit

Permalink
Add support for 64-bit ARM using the interpreter.
Browse files Browse the repository at this point in the history
Thanks to Christian Neukirchen for the patch.
  • Loading branch information
dcjm committed Jul 13, 2015
1 parent 4db6c15 commit 9d84a49
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.h.in
Expand Up @@ -548,6 +548,9 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL

/* Define if the host is an ARM (64 bit) */
#undef HOSTARCHITECTURE_AARCH64

/* Define if the host is an ARM (32 bit) */
#undef HOSTARCHITECTURE_ARM

Expand Down
6 changes: 6 additions & 0 deletions configure
Expand Up @@ -21721,6 +21721,12 @@ $as_echo "#define HOSTARCHITECTURE_PPC 1" >>confdefs.h

$as_echo "#define HOSTARCHITECTURE_ARM 1" >>confdefs.h

polyarch=interpret
;;
aarch64*)

$as_echo "#define HOSTARCHITECTURE_AARCH64 1" >>confdefs.h

polyarch=interpret
;;
ia64*)
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Expand Up @@ -412,6 +412,10 @@ case "${host_cpu}" in
AC_DEFINE([HOSTARCHITECTURE_ARM], [1], [Define if the host is an ARM (32 bit)])
polyarch=interpret
;;
aarch64*)
AC_DEFINE([HOSTARCHITECTURE_AARCH64], [1], [Define if the host is an ARM (64 bit)])
polyarch=interpret
;;
ia64*)
AC_DEFINE([HOSTARCHITECTURE_IA64], [1], [Define if the host is Itanium])
polyarch=interpret
Expand Down
4 changes: 4 additions & 0 deletions libpolyml/elfexport.cpp
Expand Up @@ -344,6 +344,10 @@ void ELFExport::exportStore(void)
directReloc = R_IA64_DIR64LSB;
fhdr.e_flags = EF_IA_64_ABI64;
useRela = true;
#elif defined(HOSTARCHITECTURE_AARCH64)
fhdr.e_machine = EM_AARCH64;
directReloc = R_AARCH64_ABS64;
useRela = true;
#else
#error "No support for exporting on this architecture"
#endif
Expand Down

0 comments on commit 9d84a49

Please sign in to comment.