macos: fix build for arm64

Adds arm64 branches to some x86 specific code and modifies some casting
logic to make Clang happy
This commit is contained in:
sguo35 authored and Ivan committed 2022-04-18 17:53:54 +03:00
1 parent 219ddf3e11
commit e761b3235c
5 files changed
+20 -5

No files matched your search

+5
View File
@@ -1222,7 +1222,12 @@ usz get_x64_access_size(x64_context* context, x64_op_t op, x64_reg_t reg, usz d_
#elif defined(ARCH_ARM64)
#if defined(__APPLE__)
// https://github.com/bombela/backward-cpp/issues/200
#define RIP(context) ((context)->uc_mcontext->__ss.__pc)
#else
#define RIP(context) ((context)->uc_mcontext.pc)
#endif
#endif /* ARCH_ */