gcc/libgcc/config
H.J. Lu 1890f2f0e2 x86: Move cpuinfo.h from libgcc to common/config/i386
Both x86 backend and libgcc define enum processor_features.  libgcc sets
enum processor_feature and x86 backend checks enum processor_feature.
They are very easy out of sync and it has happened multiple times in the
past.

1. Move cpuinfo.h from libgcc to common/config/i386 so that we can share
the same enum processor_features in x86 backend and libgcc.
2. Change __cpu_features2 to an array to support more processor features.
3. Add more processor features to enum processor_features.

gcc/

	PR target/95259
	* common/config/i386/cpuinfo.h: New file.
	(__processor_model): Moved from libgcc/config/i386/cpuinfo.h.
	(__processor_model2): New.
	(CHECK___builtin_cpu_is): New.  Defined as empty if not defined.
	(has_cpu_feature): New function.
	(set_cpu_feature): Likewise.
	(get_amd_cpu): Moved from libgcc/config/i386/cpuinfo.c.  Use
	CHECK___builtin_cpu_is.  Return AMD CPU name.
	(get_intel_cpu): Moved from libgcc/config/i386/cpuinfo.c.  Use
	Use CHECK___builtin_cpu_is.  Return Intel CPU name.
	(get_available_features): Moved from libgcc/config/i386/cpuinfo.c.
	Also check FEATURE_3DNOW, FEATURE_3DNOWP, FEATURE_ADX,
	FEATURE_ABM, FEATURE_CLDEMOTE, FEATURE_CLFLUSHOPT, FEATURE_CLWB,
	FEATURE_CLZERO, FEATURE_CMPXCHG16B, FEATURE_CMPXCHG8B,
	FEATURE_ENQCMD, FEATURE_F16C, FEATURE_FSGSBASE, FEATURE_FXSAVE,
	FEATURE_HLE, FEATURE_IBT, FEATURE_LAHF_LM, FEATURE_LM,
	FEATURE_LWP, FEATURE_LZCNT, FEATURE_MOVBE, FEATURE_MOVDIR64B,
	FEATURE_MOVDIRI, FEATURE_MWAITX, FEATURE_OSXSAVE,
	FEATURE_PCONFIG, FEATURE_PKU, FEATURE_PREFETCHWT1, FEATURE_PRFCHW,
	FEATURE_PTWRITE, FEATURE_RDPID, FEATURE_RDRND, FEATURE_RDSEED,
	FEATURE_RTM, FEATURE_SERIALIZE, FEATURE_SGX, FEATURE_SHA,
	FEATURE_SHSTK, FEATURE_TBM, FEATURE_TSXLDTRK, FEATURE_VAES,
	FEATURE_WAITPKG, FEATURE_WBNOINVD, FEATURE_XSAVE, FEATURE_XSAVEC,
	FEATURE_XSAVEOPT and FEATURE_XSAVES
	(cpu_indicator_init): Moved from libgcc/config/i386/cpuinfo.c.
	Also update cpu_model2.
	* common/config/i386/i386-cpuinfo.h (processor_vendor): Add
	Add VENDOR_CENTAUR, VENDOR_CYRIX and VENDOR_NSC.
	(processor_features): Moved from gcc/config/i386/i386-builtins.c.
	Renamed F_XXX to FEATURE_XXX.  Add FEATURE_3DNOW, FEATURE_3DNOWP,
	FEATURE_ADX, FEATURE_ABM, FEATURE_CLDEMOTE, FEATURE_CLFLUSHOPT,
	FEATURE_CLWB, FEATURE_CLZERO, FEATURE_CMPXCHG16B,
	FEATURE_CMPXCHG8B, FEATURE_ENQCMD, FEATURE_F16C,
	FEATURE_FSGSBASE, FEATURE_FXSAVE, FEATURE_HLE, FEATURE_IBT,
	FEATURE_LAHF_LM, FEATURE_LM, FEATURE_LWP, FEATURE_LZCNT,
	FEATURE_MOVBE, FEATURE_MOVDIR64B, FEATURE_MOVDIRI,
	FEATURE_MWAITX, FEATURE_OSXSAVE, FEATURE_PCONFIG,
	FEATURE_PKU, FEATURE_PREFETCHWT1, FEATURE_PRFCHW,
	FEATURE_PTWRITE, FEATURE_RDPID, FEATURE_RDRND, FEATURE_RDSEED,
	FEATURE_RTM, FEATURE_SERIALIZE, FEATURE_SGX, FEATURE_SHA,
	FEATURE_SHSTK, FEATURE_TBM, FEATURE_TSXLDTRK, FEATURE_VAES,
	FEATURE_WAITPKG, FEATURE_WBNOINVD, FEATURE_XSAVE, FEATURE_XSAVEC,
	FEATURE_XSAVEOPT, FEATURE_XSAVES and CPU_FEATURE_MAX.
	(SIZE_OF_CPU_FEATURES): New.
	* config/i386/i386-builtins.c (processor_features): Removed.
	(isa_names_table): Replace F_XXX with FEATURE_XXX.
	(fold_builtin_cpu): Change __cpu_features2 to an array.

libgcc/

	PR target/95259
	* config/i386/cpuinfo.c: Don't include "cpuinfo.h".  Include
	"common/config/i386/i386-cpuinfo.h" and
	"common/config/i386/cpuinfo.h".
	(__cpu_features2): Changed to array.
	(get_amd_cpu): Removed.
	(get_intel_cpu): Likewise.
	(get_available_features): Likewise.
	(__cpu_indicator_init): Call cpu_indicator_init.
	* config/i386/cpuinfo.h: Removed.
2020-06-24 05:47:34 -07:00
..
aarch64 [AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc 2020-05-06 16:20:38 +01:00
alpha
arc
arm arm: unified syntax for libgcc when built with -Os [PR94220] 2020-03-26 10:59:34 +00:00
avr Daily bump. 2020-06-24 00:16:31 +00:00
bfin
bpf
c6x
cr16
cris libgcc: cris: Remove support for crisv32-*-* and cris*-*-linux 2020-05-09 03:00:38 +02:00
csky
epiphany
fr30
frv
ft32
gcn
h8300
i386 x86: Move cpuinfo.h from libgcc to common/config/i386 2020-06-24 05:47:34 -07:00
ia64 Missing __divtf3@@GCC_4.4.0 on ia64 2020-06-04 09:56:32 +02:00
iq2000
libbid Add missing ChangeLog entries. 2020-05-05 16:10:13 +02:00
lm32
m32c
m32r
m68k
mcore
microblaze
mips
mmix
moxie
msp430
nds32
nios2
nvptx
or1k
pa
pdp11
pru
riscv RISC-V: Make __divdi3 handle div by zero same as hardware. 2020-06-02 11:44:44 -07:00
rl78
rs6000 aix: Add GCC64 configuration and FAT target libraries. 2020-06-21 14:14:46 -04:00
rx
s390 S/390 zTPF: Handle skip trace addresses when unwinding 2020-04-03 08:46:11 +02:00
score
sh
sol2
sparc
stormy16
tilegx
tilepro
v850
vax
visium
vms
xtensa xtensa: libgcc: fix PR target/95571 2020-06-08 18:30:07 -07:00
darwin10-unwind-find-enc-func.c
darwin-64.c
darwin-crt3.c
darwin-crt-tm.c
gthr-lynx.h
gthr-rtems.h
gthr-vxworks-cond.c
gthr-vxworks-thread.c
gthr-vxworks-tls.c
gthr-vxworks.c
gthr-vxworks.h
hardfp.c
libgcc-glibc.ver
libgcc-libsystem.ver
no-sfp-machine.h
no-unwind.h
t-crtfm
t-crtstuff-pic
t-darwin
t-dfprules
t-eh-dw2-dip
t-fdpbit
t-fixedpoint-gnu-prefix
t-fpbit
t-freebsd-thread
t-gnu-prefix
t-gthr-noweak
t-gthr-vxworks
t-gthr-vxworksae
t-hardfp
t-hardfp-sfdf
t-libgcc-pic
t-libunwind
t-libunwind-elf
t-linux
t-openbsd-thread
t-rtems
t-slibgcc
t-slibgcc-darwin
t-slibgcc-elf-ver
t-slibgcc-fuchsia
t-slibgcc-gld
t-slibgcc-gld-nover
t-slibgcc-hpux
t-slibgcc-libgcc
t-slibgcc-nolc-override
t-slibgcc-sld
t-slibgcc-vms
t-softfp
t-softfp-compat
t-softfp-excl
t-softfp-sfdf
t-softfp-sfdftf
t-softfp-tf
t-stack
t-tls
t-vxcrtstuff
t-vxworks
t-vxworks7
t-vxworksae
unwind-dw2-fde-darwin.c
vxcache.c
vxcrtstuff.c