https://github.com/python/cpython/commit/b643e2f531f86d9afada130a36803e3bb025b5be commit: b643e2f531f86d9afada130a36803e3bb025b5be branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: nascheme <[email protected]> date: 2026-10-16T20:10:09-07:00 summary:
[3.14] gh-157906: fix an incorrect architecture macro check in free-threaded GC (gh-157907) (gh-159426) Fix typo in free-threaded GC prefetch check for 32-bit x86 MSVC. (cherry picked from commit 1b015e66f058f29de4d97031b465587ec15cace9) Co-authored-by: Pengyu Lee <[email protected]> files: A Misc/NEWS.d/next/Windows/2026-09-21-20-54-37.gh-issue-157906.RlyLkY.rst M Python/gc_free_threading.c diff --git a/Misc/NEWS.d/next/Windows/2026-09-21-20-54-37.gh-issue-157906.RlyLkY.rst b/Misc/NEWS.d/next/Windows/2026-09-21-20-54-37.gh-issue-157906.RlyLkY.rst new file mode 100644 index 000000000000000..3e0ca08a58abec5 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2026-09-21-20-54-37.gh-issue-157906.RlyLkY.rst @@ -0,0 +1,2 @@ +Fix an incorrect architecture macro check that prevented CPU prefetching in +the free-threaded garbage collector on 32-bit Windows builds. diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c index 285f24806e8fd4f..abc69c924654ae6 100644 --- a/Python/gc_free_threading.c +++ b/Python/gc_free_threading.c @@ -566,7 +566,7 @@ static_assert(BUFFER_HI < BUFFER_SIZE && #define PREFETCH_T1(ptr) __builtin_prefetch(ptr, 0, 2) #define PREFETCH_T2(ptr) __builtin_prefetch(ptr, 0, 1) #define PREFETCH_NTA(ptr) __builtin_prefetch(ptr, 0, 0) -#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) && !defined(_M_ARM64EC) +#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) && !defined(_M_ARM64EC) #include <mmintrin.h> #define PREFETCH_T0(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) #define PREFETCH_T1(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T1) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
