patchGNU Autoconf Archive - Patches: patch #8514, AX_GCC_ARCHFLAG: rewrite x86...


patch #8514: AX_GCC_ARCHFLAG: rewrite x86 support

Submitted by:  Tsukasa OI <a4lg>
Submitted on:  Fri Aug 15 09:41:46 2014  
Priority: 5 - NormalStatus: Done
Assigned to: Peter Simons <simons>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed Oct 15 09:05:10 2014, comment #5:

I pushed your patch in commit d061ba9. Thank you very much for the update!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Tue Aug 19 07:36:40 2014, comment #4:

Shame on me!
I have to post a new patch because an AMD Bulldozer identification pattern was wrong.

(file #31917)

Tsukasa OI <a4lg>
Tue Aug 19 07:28:12 2014, comment #3:

I posted file #31916 to fix issues (found on previous two versions).

  • I used wrong pattern for Bay Trail, a Silvermont-based processor family (IS model 37h but was model 35h).
  • I forgot to add AMD NPT processors (K8-based).

Now I have tested all patterns found in <> and looks fine.

Tsukasa OI <a4lg>
Tue Aug 19 02:32:22 2014, comment #2:

I posted an article (memo) containing detailed data and script used to rewrite this macro at <>.

Tsukasa OI <a4lg>
Fri Aug 15 23:50:19 2014, comment #1:

I posted file #31908 for minor fix (Intel EP80579 identification pattern was placed in the wrong place).

Tsukasa OI <a4lg>
Fri Aug 15 09:41:46 2014, original submission:

`case' patterns and CPUID identification patterns on AX_GCC_ARCHFLAG are quite old and not robust enough to support future processors.
I decided to rewrite x86 support to make them robust. I used a Python script to generate robust patterns and verified all processor identification patterns are "genuine".

Originally, I planned to submit this patch by multiple patches (to do the separate "change" one by one) but I found several fixes have cross dependencies and "intermediate" versions of macro were nearly unusable (partially because of "incomplete" fixes and partially because of known issue on Clang). If this is inappropriate, please comment that.

Anyway, this patch includes several kinds of fixes and additions.
There are following changes.


  • Rewritten CPUID identification (constructed by a script).
  • Check EDX/ECX (not only EBX) on vendor identification.


  • Simplify some Intel/AMD processor support (because most compilers merge support for same/similar microarchitecture, even if they have different brand names).

[BUG FIXES (except possible issues fixed in CPUID ROBUSTNESS section)]

  • Fix 64-bit FreeBSD support.
  • Fix support for AMD K6-2+/K6-III+ (because they are K6-3 based, not K6-2 based)
  • Fix support for AMD family 11h (some mobile processors based on K8 but misunderstood as amdfam10)


  • Make all CPUID patterns "evidence-based" (to never mix fallbacks and actual processors)
  • Remove all CPU support which existence of processor could not be confirmed by official documents.
  • Add AMD Piledriver/Steamroller/Jaguar support
  • Add Intel Atom (Bonnell/Silvermont) support
  • Add Intel Ivy Bridge/Haswell/Broadwell support
  • Add support for some Centaur-based processors (some Cyrix III models, some WinChip models, some VIA C3 models, VIA C7 and later)


  • Add further compiler support for GCC 4.9/LLVM Clang.

Clang does not fail if -mtune=[UNKNOWN_PROCESSOR] and/or -mcpu=[UNKNOWN_PROCESSOR] are specified. We need to fix Clang support later (by change order of option checking).

Tsukasa OI <a4lg>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #31917:  0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch added by a4lg (8kB - application/octet-stream - version 4 : Fix AMD Bulldozer model number)
file #31916:  0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch added by a4lg (8kB - application/octet-stream - version 3 : fix Silvermont (Bay Trail) processors and AMD K8 (add NPT processors missing in version 2))


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by simons
  • -unavailable- added by a4lg (Submitted the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Oct 16 08:53:53 2014simonsStatusReady For Test=>Done
    Wed Oct 15 09:15:02 2014simonsStatusIn Progress=>Ready For Test
    Wed Oct 15 09:05:10 2014simonsStatusNone=>In Progress
      Assigned toNone=>simons
      Carbon-Copy-=>Added steven g. johnson
    Tue Aug 19 07:36:40 2014a4lgAttached File-=>Added 0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch, #31917
    Tue Aug 19 07:24:17 2014a4lgAttached File-=>Added 0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch, #31916
    Fri Aug 15 23:49:19 2014a4lgAttached File-=>Added 0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch, #31908
    Fri Aug 15 09:41:46 2014a4lgAttached File-=>Added 0001-AX_GCC_ARCHFLAG-rewrite-x86-support.patch, #31903

    Back to the top

    Powered by Savane 3.1-cleanup1