summary refs log tree commit diff
path: root/arm64/targ.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm64/targ.c')
-rw-r--r--arm64/targ.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/arm64/targ.c b/arm64/targ.c
index 6079236..88c40f1 100644
--- a/arm64/targ.c
+++ b/arm64/targ.c
@@ -25,25 +25,39 @@ arm64_memargs(int op)
 	return 0;
 }
 
+#define ARM64_COMMON \
+	.gpr0 = R0, \
+	.ngpr = NGPR, \
+	.fpr0 = V0, \
+	.nfpr = NFPR, \
+	.rglob = RGLOB, \
+	.nrglob = 3, \
+	.rsave = arm64_rsave, \
+	.nrsave = {NGPS, NFPS}, \
+	.retregs = arm64_retregs, \
+	.argregs = arm64_argregs, \
+	.memargs = arm64_memargs, \
+	.isel = arm64_isel, \
+
 Target T_arm64 = {
 	.name = "arm64",
-	.gpr0 = R0,
-	.ngpr = NGPR,
-	.fpr0 = V0,
-	.nfpr = NFPR,
-	.rglob = RGLOB,
-	.nrglob = 3,
-	.rsave = arm64_rsave,
-	.nrsave = {NGPS, NFPS},
-	.retregs = arm64_retregs,
-	.argregs = arm64_argregs,
-	.memargs = arm64_memargs,
 	.abi0 = elimsb,
 	.abi1 = arm64_abi,
-	.isel = arm64_isel,
 	.emitfn = arm64_emitfn,
 	.emitfin = elf_emitfin,
 	.asloc = ".L",
+	ARM64_COMMON
+};
+
+Target T_arm64_apple = {
+	.name = "arm64_apple",
+	.abi0 = apple_extsb,
+	.abi1 = apple_abi,
+	.emitfn = apple_emitfn,
+	.emitfin = macho_emitfin,
+	.asloc = "L",
+	.assym = "_",
+	ARM64_COMMON
 };
 
 MAKESURE(globals_are_not_arguments,