arm: Don't test x264_cpu_fast_neon_mrc_test on Windows

The performance counters themselves are accessible, but the PMNC
(control register) that we try to read to see if the performance
counters are accessible, is not readable, causing illegal
instructions in cpu_enable_armv7_counter.

As an alternative, we could also modify cpu_fast_neon_mrc_test to
not inspect the PMNC at all (skip calling cpu_enable_armv7_counter)
but just assume that the counters are available, in high resolution
mode. However just not calling this codepath is the simplest,
as Windows on 32 bit ARM isn't very relevant these days.
This commit is contained in:
Martin Storsjö
2025-06-06 12:49:30 +03:00
parent ff620d0c3c
commit 714e07b477
+3 -1
View File
@@ -450,7 +450,9 @@ uint32_t x264_cpu_detect( void )
// x264 instance disables or reinits the counters while x264 is using them,
// which may result in incorrect detection and the counters stuck enabled.
// right now Apple does not seem to support performance counters for this test
#ifndef __MACH__
// Don't test this on Windows; performance counters are readable, but
// the PMNC is not readable.
#if !defined(__MACH__) && !defined(_WIN32)
flags |= x264_cpu_fast_neon_mrc_test() ? X264_CPU_FAST_NEON_MRC : 0;
#endif
// TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc)