Hi,
I have added 64-bit ARM support for PolyML, using the interpreted mode.
It seems to be enough to natively compile and run the test suite completely.
Tested on
Linux voidarm64 3.16.0-37-generic #51-Ubuntu SMP Tue May 5 13:51:19 UTC 2015
aarch64 aarch64 aarch64 GNU/Linux
--- a/config.h.in
+++ b/config.h.in
@@ -551,6 +551,9 @@
/* Define if the host is an ARM (32 bit) */
#undef HOSTARCHITECTURE_ARM
+/* Define if the host is an ARM (64 bit) */
+#undef HOSTARCHITECTURE_AARCH64
+
/* Define if the host is Itanium */
#undef HOSTARCHITECTURE_IA64
--- a/configure.ac
+++ b/configure.ac
@@ -408,6 +408,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
--- a/libpolyml/elfexport.cpp
+++ b/libpolyml/elfexport.cpp
@@ -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
Enjoy,
--
Christian Neukirchen <[email protected]> http://chneukirchen.org
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml