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. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
fa20f5cd9e
commit
abc346de73
14
configure
vendored
14
configure
vendored
@ -5445,20 +5445,18 @@ elif enabled x86; then
|
|||||||
cpuflags="-march=$cpu"
|
cpuflags="-march=$cpu"
|
||||||
disable i686
|
disable i686
|
||||||
;;
|
;;
|
||||||
# targets that do support nopl and conditional mov (cmov)
|
|
||||||
i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx\
|
|
||||||
|core*|atom|bonnell|nehalem|westmere|silvermont|sandybridge|ivybridge|haswell|broadwell|skylake*|knl\
|
|
||||||
|amdfam10|barcelona|b[dt]ver*|znver*)
|
|
||||||
cpuflags="-march=$cpu"
|
|
||||||
enable i686
|
|
||||||
enable fast_cmov
|
|
||||||
;;
|
|
||||||
# targets that do support conditional mov but on which it's slow
|
# targets that do support conditional mov but on which it's slow
|
||||||
pentium4|pentium4m|prescott|nocona)
|
pentium4|pentium4m|prescott|nocona)
|
||||||
cpuflags="-march=$cpu"
|
cpuflags="-march=$cpu"
|
||||||
enable i686
|
enable i686
|
||||||
disable fast_cmov
|
disable fast_cmov
|
||||||
;;
|
;;
|
||||||
|
# everything else should support nopl and conditional mov (cmov)
|
||||||
|
*)
|
||||||
|
cpuflags="-march=$cpu"
|
||||||
|
enable i686
|
||||||
|
enable fast_cmov
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user