diff --git a/CMakeLists.txt b/CMakeLists.txt index 160de7c8..d04010cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") endif() if(PLATFORM_ANDROID) - set(ARCH_ARM64 TRUE) + set(ARCH_A64 TRUE) else() set(ARCH_X64 TRUE) endif() @@ -277,8 +277,8 @@ if(ARCH_X64) src/jit/backend/x64/x64_backend.cc src/jit/backend/x64/x64_disassembler.c src/jit/backend/x64/x64_dispatch.cc) -elseif(ARCH_ARM64) - list(APPEND RELIB_DEFS ARCH_ARM64=1) +elseif(ARCH_A64) + list(APPEND RELIB_DEFS ARCH_A64=1) endif() if(COMPILER_GCC OR COMPILER_CLANG) diff --git a/src/core/exception_handler.h b/src/core/exception_handler.h index 12914ed7..14250f47 100644 --- a/src/core/exception_handler.h +++ b/src/core/exception_handler.h @@ -14,7 +14,7 @@ enum exception_type { }; struct thread_state { -#if ARCH_ARM64 +#if ARCH_A64 union { struct { uint64_t r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, diff --git a/src/core/exception_handler_linux.c b/src/core/exception_handler_linux.c index 994b4e06..eb688a63 100644 --- a/src/core/exception_handler_linux.c +++ b/src/core/exception_handler_linux.c @@ -7,7 +7,7 @@ static struct sigaction old_sigsegv; static struct sigaction old_sigill; static inline void copy_state_to(mcontext_t *src, struct thread_state *dst) { -#if ARCH_ARM64 +#if ARCH_A64 struct fpsimd_context *simd = (struct fpsimd_context *)&src->__reserved; CHECK_EQ(simd->head.magic, FPSIMD_MAGIC); CHECK_EQ(simd->head.size, sizeof(struct fpsimd_context)); @@ -48,7 +48,7 @@ static inline void copy_state_to(mcontext_t *src, struct thread_state *dst) { } static inline void copy_state_from(struct thread_state *src, mcontext_t *dst) { -#if ARCH_ARM64 +#if ARCH_A64 struct fpsimd_context *simd = (struct fpsimd_context *)&dst->__reserved; CHECK_EQ(simd->head.magic, FPSIMD_MAGIC); CHECK_EQ(simd->head.size, sizeof(struct fpsimd_context)); @@ -95,7 +95,7 @@ static void signal_handler(int signo, siginfo_t *info, void *ctx) { struct exception_state ex; ex.type = signo == SIGSEGV ? EX_ACCESS_VIOLATION : EX_INVALID_INSTRUCTION; ex.fault_addr = (uintptr_t)info->si_addr; -#if ARCH_ARM64 +#if ARCH_A64 ex.pc = uctx->uc_mcontext.pc; #elif ARCH_X64 ex.pc = uctx->uc_mcontext.gregs[REG_RIP];