https://github.com/python/cpython/commit/1b015e66f058f29de4d97031b465587ec15cace9
commit: 1b015e66f058f29de4d97031b465587ec15cace9
branch: main
author: Pengyu Lee <[email protected]>
committer: nascheme <[email protected]>
date: 2026-10-03T11:36:01-07:00
summary:

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

Fix typo in free-threaded GC prefetch check for 32-bit x86 MSVC.

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 f865ac2f7db0853..004b5871d196e40 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