Unified · Split
| @@ -110,6 +110,7 @@ DEF-arm = $(DEF-arm-eabihf) · 109 unmodified lines | ||
| 110 | 110 | DEF-arm-NetBSD = $(DEF-arm-eabihf) -DTARGETOS_NetBSD |
| 111 | 111 | DEF-arm-wince = $(DEF-arm-eabihf) -DTCC_TARGET_PE |
| 112 | 112 | DEF-arm64 = -DTCC_TARGET_ARM64 |
| 113 | +DEF-arm64-osx = $(DEF-arm64) -DTCC_TARGET_MACHO | |
| 113 | 114 | DEF-arm64-FreeBSD = $(DEF-arm64) -DTARGETOS_FreeBSD |
| 114 | 115 | DEF-arm64-NetBSD = $(DEF-arm64) -DTARGETOS_NetBSD |
| 115 | 116 | DEF-arm64-OpenBSD = $(DEF-arm64) -DTARGETOS_OpenBSD |
| @@ -198,6 +199,7 @@ arm-vfp_FILES = $(arm_FILES) · 82 unmodified lines | ||
| 198 | 199 | arm-eabi_FILES = $(arm_FILES) |
| 199 | 200 | arm-eabihf_FILES = $(arm_FILES) |
| 200 | 201 | arm64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c arm64-asm.c |
| 202 | +arm64-osx_FILES = $(arm64_FILES) tccmacho.c | |
| 201 | 203 | c67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c |
| 202 | 204 | riscv64_FILES = $(CORE_FILES) riscv64-gen.c riscv64-link.c riscv64-asm.c |
| 203 | 205 | |
| @@ -716,6 +716,11 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) · 715 unmodified lines | ||
| 716 | 716 | #elif defined(__arm__) |
| 717 | 717 | rc->ip = uc->uc_mcontext.arm_pc; |
| 718 | 718 | rc->fp = uc->uc_mcontext.arm_fp; |
| 719 | +#elif defined(__aarch64__) && defined(__APPLE__) | |
| 720 | + // see: | |
| 721 | + // /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/mach/arm/_structs.h | |
| 722 | + rc->ip = uc->uc_mcontext->__ss.__pc; | |
| 723 | + rc->fp = uc->uc_mcontext->__ss.__fp; | |
| 719 | 724 | #elif defined(__aarch64__) && defined(__FreeBSD__) |
| 720 | 725 | rc->ip = uc->uc_mcontext.mc_gpregs.gp_elr; /* aka REG_PC */ |
| 721 | 726 | rc->fp = uc->uc_mcontext.mc_gpregs.gp_x[29]; |