Landing: 44cc8e5718ef

Project / Subsystem

gcc / i386

Date

2026-03-17

Author

Ewan

Commit

44cc8e5718efd0cc1ef57c68052dbe33b047f158

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
i386
patch_id
—
commit_hash
44cc8e5718efd0cc1ef57c68052dbe33b047f158
source_type
github
headline
i386: Correct CPUID range checks for Centaur/Zhaoxin.
tldr
Fixes __get_cpuid() to correctly identify CPUID ranges including Centaur/Zhaoxin.
author
Ewan
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • i386
  • • CPUID
  • • Centaur
  • • Zhaoxin
  • • feature detection
discussion_id_link
—
bugzilla_pr
—
date
2026-03-17T00:00:00.000Z

This commit rectifies an issue with the __get_cpuid() and __get_cpuid_count() functions on i386 architectures. Previously, a simple bitmask incorrectly categorized the Centaur/Zhaoxin CPUID range (0xC0000000) as the Extended range, leading to incorrect results. The fix replaces the bitmask with explicit range checks, accurately identifying all four CPUID ranges (Basic, Hypervisor, Extended, and Centaur/Zhaoxin) and improving feature detection for these processors.