History

configure: rework parsing --cpu arguments to support all features unless blacklisted

Keeping an ever growing list of CPUs just to pass -march to the compiler and enable fast_cmov is a waste of time. Every CPU we know has limitations is already handled here, so just fallback to enabling everything when a passed in argument is not one of those. This will enable optimizations for CPU architectures released in the past 7 or so years with supported GCC and clang compilers when used as argument in configure, instead of silently ignoring them.

James Almer committed 3 years ago

Commit abc346d1 parent fa20f5c1 file · +6 −8Browse files

Unified · Split

configure+6−8
@@ -5445,20 +5445,18 @@ elif enabled x86; then · 5444 unmodified lines
5445 cpuflags="-march=$cpu"5445 cpuflags="-march=$cpu"
5446 disable i6865446 disable i686
5447 ;;5447 ;;
5448 # targets that do support nopl and conditional mov (cmov)
5449 i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx\
5450 |core*|atom|bonnell|nehalem|westmere|silvermont|sandybridge|ivybridge|haswell|broadwell|skylake*|knl\
5451 |amdfam10|barcelona|b[dt]ver*|znver*)
5452 cpuflags="-march=$cpu"
5453 enable i686
5454 enable fast_cmov
5455 ;;
5456 # targets that do support conditional mov but on which it's slow5448 # targets that do support conditional mov but on which it's slow
5457 pentium4|pentium4m|prescott|nocona)5449 pentium4|pentium4m|prescott|nocona)
5458 cpuflags="-march=$cpu"5450 cpuflags="-march=$cpu"
5459 enable i6865451 enable i686
5460 disable fast_cmov5452 disable fast_cmov
5461 ;;5453 ;;
5454 # everything else should support nopl and conditional mov (cmov)
5455 *)
5456 cpuflags="-march=$cpu"
5457 enable i686
5458 enable fast_cmov
5459 ;;
5462 esac5460 esac
5463 5461
5464fi5462fi

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t