Fix building on macOS ARM

This commit is contained in:
Kovid Goyal
2024-01-14 15:06:36 +05:30
parent a9111f9a40
commit 0e4c49a0d6
2 changed files with 3 additions and 1 deletions

View File

@@ -21,6 +21,9 @@ _Pragma("clang diagnostic pop")
#endif
#ifndef _MM_SHUFFLE
#define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
#endif
#define CONCAT(A, B) A##B
#define CONCAT_EXPAND(A, B) CONCAT(A,B)
#define FUNC(name) CONCAT_EXPAND(name##_, BITS)

View File

@@ -118,7 +118,6 @@ bool
init_simd(void *x) {
PyObject *module = (PyObject*)x;
if (PyModule_AddFunctions(module, module_methods) != 0) return false;
__builtin_cpu_init();
#define A(x, val) { Py_INCREF(Py_##val); if (0 != PyModule_AddObject(module, #x, Py_##val)) return false; }
#ifdef __APPLE__
#ifdef __arm64__