aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/aarch64/sysdeps.h
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-23 15:54:51 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-26 18:44:28 +0100
commitc50680bb86564fe61db61e6140a418ccc7d36677 (patch)
tree58f8731421325939c93546df3c9046fbf96a051e /runtime/aarch64/sysdeps.h
parent73551e058a850297bc72924a69b39affcfa49dfa (diff)
downloadcompcert-c50680bb86564fe61db61e6140a418ccc7d36677.tar.gz
compcert-c50680bb86564fe61db61e6140a418ccc7d36677.zip
AArch64: macOS port
This commit adds support for macOS (and probably iOS) running on AArch64 / ARM 64-bit / "Apple silicon" processors.
Diffstat (limited to 'runtime/aarch64/sysdeps.h')
-rw-r--r--runtime/aarch64/sysdeps.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/aarch64/sysdeps.h b/runtime/aarch64/sysdeps.h
index 0cee9ae3..e688961a 100644
--- a/runtime/aarch64/sysdeps.h
+++ b/runtime/aarch64/sysdeps.h
@@ -34,6 +34,25 @@
// System dependencies
+#if defined(SYS_macosx)
+
+#define GLOB(x) _##x
+
+#define FUNCTION(f) FUNCTION f
+
+.macro FUNCTION name
+ .text
+ .globl _\name
+ .align 4
+_\name:
+.endm
+
+#define ENDFUNCTION(f)
+
+#else
+
+#define GLOB(x) x
+
#define FUNCTION(f) \
.text; \
.balign 16; \
@@ -43,3 +62,4 @@ f:
#define ENDFUNCTION(f) \
.type f, @function; .size f, . - f
+#endif