To fully compile mach_signal.cpp needs a fix.
macosx-x86-fat:
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.fat
macosx-x86-fat:
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.fat
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.arm64
linux-arm-64:
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.arm64
linux-arm-64:
include vm/Config.arm64.64
PLAF_DLL_OBJS += vm/cpu-arm.64.cpp
include vm/Config.arm64.64
PLAF_DLL_OBJS += vm/cpu-arm.64.cpp
-PLAF_MASTER_HEADERS += vm/os-macosx-arm64.64.hpp
+PLAF_MASTER_HEADERS += vm/os-macosx-arm64.hpp
#else
asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif
#else
asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif
#elif defined(FACTOR_AMD64)
#if defined(_MSC_VER)
n = 0;
#elif defined(FACTOR_AMD64)
#if defined(_MSC_VER)
n = 0;
#else
asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif
#else
asm("bsr %1, %0;" : "=r"(n) : "r"(x));
#endif
+
+#elif defined(FACTOR_ARM64)
+#if defined(_MSC_VER)
+ n = 0;
+ _BitScanReverse64((unsigned long*)&n, x);
+#else
+ asm("bsr %1, %0;" : "=r"(n) : "r"(x));
+#endif
+
#elif defined(FACTOR_PPC64)
#if defined(__GNUC__)
n = (63 - __builtin_clzll(x));
#else
#error Unsupported compiler
#endif
#elif defined(FACTOR_PPC64)
#if defined(__GNUC__)
n = (63 - __builtin_clzll(x));
#else
#error Unsupported compiler
#endif
#elif defined(FACTOR_PPC32)
#if defined(__GNUC__)
n = (31 - __builtin_clz(x));
#else
#error Unsupported compiler
#endif
#elif defined(FACTOR_PPC32)
#if defined(__GNUC__)
n = (31 - __builtin_clz(x));
#else
#error Unsupported compiler
#endif
#else
#error Unsupported CPU
#endif
#else
#error Unsupported CPU
#endif
// Detect target CPU type
#if defined(__arm__)
#define FACTOR_ARM
// Detect target CPU type
#if defined(__arm__)
#define FACTOR_ARM
+#elif defined(__aarch64__)
+#define FACTOR_ARM64
#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
#define FACTOR_AMD64
#define FACTOR_64
#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
#define FACTOR_AMD64
#define FACTOR_64
#include "os-macosx-x86.32.hpp"
#elif defined(FACTOR_AMD64)
#include "os-macosx-x86.64.hpp"
#include "os-macosx-x86.32.hpp"
#elif defined(FACTOR_AMD64)
#include "os-macosx-x86.64.hpp"
+ #elif defined(FACTOR_ARM64)
+ #include "os-macosx-arm64.hpp"
#else
#error "Unsupported Mac OS X flavor"
#endif
#else
#error "Unsupported Mac OS X flavor"
#endif
#include "cpu-ppc.hpp"
#elif defined(FACTOR_ARM)
#include "cpu-arm.hpp"
#include "cpu-ppc.hpp"
#elif defined(FACTOR_ARM)
#include "cpu-arm.hpp"
+#elif defined(FACTOR_ARM64)
+ #include "cpu-arm.64.hpp"
+ #include "cpu-arm.hpp"
#else
#error "Unsupported CPU"
#endif
#else
#error "Unsupported CPU"
#endif