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
54455445 cpuflags="-march=$cpu"
54465446 disable i686
54475447 ;;
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− ;;
54565448 # targets that do support conditional mov but on which it's slow
54575449 pentium4|pentium4m|prescott|nocona)
54585450 cpuflags="-march=$cpu"
54595451 enable i686
54605452 disable fast_cmov
54615453 ;;
5454+ # everything else should support nopl and conditional mov (cmov)
5455+ *)
5456+ cpuflags="-march=$cpu"
5457+ enable i686
5458+ enable fast_cmov
5459+ ;;
54625460 esac
54635461
54645462 fi

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