summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--jmp.S15
2 files changed, 15 insertions, 2 deletions
diff --git a/configure b/configure
index de63be92..4739ccd4 100755
--- a/configure
+++ b/configure
@@ -1496,7 +1496,7 @@ if [ -z "$lit_align" ] ; then
exit 1
fi
- if [ -n "$darwin_target" ] ; then
+ if [ -n "$darwin_target" ] && [ "$(arch)" = "i386" ] ; then
lit_align=2
else
lit_align=$SIZEOF_WCHAR_T
diff --git a/jmp.S b/jmp.S
index cac36363..5a834d5c 100644
--- a/jmp.S
+++ b/jmp.S
@@ -29,6 +29,11 @@
#define DEFUN(NAME) \
.global _ ## NAME ; \
_ ## NAME: ;
+#elif __APPLE__ && __arm64__
+#define DEFUN(NAME) \
+.globl _ ## NAME %% \
+.p2align 2 %% \
+_ ## NAME: ;
#elif __APPLE__
#define DEFUN(NAME) \
.globl _ ## NAME ; \
@@ -295,7 +300,11 @@ DEFUN(jmp_restore)
mr %r3, %r4
blr
-#elif __aarch64__
+#elif __aarch64__ || __arm64__
+
+#if __APPLE__
+ .section __TEXT,__text,regular,pure_instructions
+#endif
DEFUN(jmp_save)
stp x19, x20, [x0, 0]
@@ -329,6 +338,10 @@ DEFUN(jmp_restore)
mov w0, w1
br x30
+#if __APPLE__
+ .subsections_via_symbols
+#endif
+
#elif _MIPS_SZPTR == 32
.set noreorder