https://github.com/python/cpython/commit/a73827e5bc4bb993504d5384071a8c734b36e2ea
commit: a73827e5bc4bb993504d5384071a8c734b36e2ea
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: nascheme <[email protected]>
date: 2026-10-16T20:09:46-07:00
summary:

[3.15] gh-157906: fix an incorrect architecture macro check in free-threaded GC 
 (gh-157907) (gh-159427)

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 57784d4c0fe539d..dc31906fecc5d49 100644
--- a/Python/gc_free_threading.c
+++ b/Python/gc_free_threading.c
@@ -548,7 +548,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]

Reply via email to