summaryrefslogtreecommitdiff
path: root/arm64/common.S
blob: 34bb5296a4b604d19c6ac571358b2b0f50e3b2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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