Skip to content

Altivec fixes for Darwin: do not use unsupported VSX insns

Existing macros checking for __VSX__ define do not work correctly on macOS: GCC thinks VSX is available, however ISA used in 7450 and 970 CPUs do not support those insns (those were introduced in v2.06, which 970 supports ISA up to v2.03). Example why it matters (and how I discovered the problem in the first place): nanoflann examples use Eigen headers, and invoke VSX – when the build is for ppc32 on MacOS, see: https://trac.macports.org/ticket/66602

Additional PPC-related fix: in order for macOS ppc64 being recognized, either __ppc64__ should be specified or __POWERPC__ (which encompasses both __ppc__ and __ppc64__). The latter is perhaps preferable, since it also gonna include a case of BeOS. (I am not sure if any non-Apple OS uses __ppc__; if not, __POWERPC__ is sufficient.)

Merge request reports

Loading