summaryrefslogtreecommitdiff
path: root/_common/aarch64
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-09-28 20:22:30 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-09-28 20:22:30 -0500
commit45f518dfbcd421e76bfd043b905cd6d7436906e5 (patch)
tree6e745dac1f3410563a4b1826b19bf14fb3b1a039 /_common/aarch64
parentf85da73ffa825620282daa551c89a3398c985316 (diff)
aarch64: move common.S to _common/aarch64
Diffstat (limited to '_common/aarch64')
-rw-r--r--_common/aarch64/common.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/_common/aarch64/common.S b/_common/aarch64/common.S
new file mode 100644
index 0000000..34bb529
--- /dev/null
+++ b/_common/aarch64/common.S
@@ -0,0 +1,25 @@
+// ================================================================================================
+// Shared macros
+//
+// License:
+// SPDX-License-Identifier: 0BSD
+// Copyright (c) 2026 Hunter Kvalevog
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE.
+// ================================================================================================
+
+#define CONCAT_(A, B) A ## B
+#define CONCAT(A, B) CONCAT_(A, B)
+
+#ifdef __APPLE__
+# define SYM(LABEL) CONCAT(_, LABEL)
+# define TEXT_SEGMENT .section __TEXT,__text
+#else
+# define SYM(LABEL) LABEL
+# define TEXT_SEGMENT .section .text
+#endif
+