OSDN Git Service

* gcc/config/i386/cpuid.h: New file.
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2007 17:43:01 +0000 (17:43 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2007 17:43:01 +0000 (17:43 +0000)
commitdaf03e2f6d2149ef64bbbbf9fdb81e8ad0c07c99
tree16b3a7f9f7833da2cad7c43376d098af0e2601ca
parent2c51f67b4d1d60b041c09942ddd999165efcc8b5
* gcc/config/i386/cpuid.h: New file.
* gcc/config/i386/driver-i386.c: Include cpuid.h.
(describe_cache): Shrink size and line strings to 100 bytes.
(detect_caches_amd): Return "" for unsupported max_ext_level.
Use __cpuid function.
(detect_caches_intel): Return "" for unsupported max_level.
Use __cpuid function.
(host_detect_local_cpu): Change feature flag variables to
unsigned int.  Initialize only extended feature flag variables.
Use __get_cpuid_max to determine max supported cpuid level.
Use __cpuid function to determine supported features.  Fix
calculation of family id.  Remove is_amd and check signature
directly.  Check for Geode signature.  Handle family 4 id.
[PROCESSOR_GENERIC32]: New default for unknown family id. Move
cpu discovery code to other part of the function.
[PROCESSOR_PENTIUM, PROCESSOR_K6, PROCESSOR_ATHLON]: Do not tune
for sub-architecture.
[PROCESSOR_PENTIUMPRO]: Simplify cpu discovery code.
[PROCESSOR_K8]: Add k8-sse3 architecture.
[PROCESSOR_GENERIC64]: Remove.
* gcc/config/i386/x-i386 (driver-i386.o): Depend on cpuid.h.
* gcc/config/i386/crtfastmath.c: Include cpuid.h.  Use __get_cpuid
to check for SSE and FXSAVE support.
* gcc/config/i386/t-crtfm (crtfastmath.o): Depend on cpuid.h.
Add -minline-all-stringops.
* gcc/config.gcc (i[34567]86-*-*): Add cpuid.h to extra_headers.
(x86_64-*-*): Ditto.

testsuite/ChangeLog:

* gcc.dg/i386-cpuid.h: Remove.
* gcc.target/i386/mmx-check.h: Include cpuid.h.  Use __get_cpuid.
* gcc.target/i386/sse-check.h: Ditto.
* gcc.target/i386/sse2-check.h: Ditto.
* gcc.target/i386/sse3-check.h: Ditto.
* gcc.target/i386/ssse3-check.h: Ditto.
* gcc.target/i386/sse4_1-check.h: Ditto.
* gcc.target/i386/sse4_2-check.h: Ditto.
* gcc.target/i386/sse4a-check.h: Ditto.
* gcc.dg/torture/pr16104-1.c: Ditto.
* gcc.target/i386/mmx-4.c: Do not use NOINLINE.
* gcc.target/i386/sse-6.c: Ditto.
* gcc.target/i386/sse-7.c: Ditto.
* g++.dg/other/i386-1.C: Include cpuid.h.
(main): New function.  Use __get_cpuid to check target fetaures.

libgomp/ChangeLog:

* testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
(main): Use __get_cpuid to get i386 target fetaures.
* testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
(main): Use __get_cpuid to get x86_64 target fetaures.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128141 138bc75d-0d04-0410-961f-82ee72b054a4
26 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/i386/cpuid.h [new file with mode: 0644]
gcc/config/i386/crtfastmath.c
gcc/config/i386/driver-i386.c
gcc/config/i386/t-crtfm
gcc/config/i386/x-i386
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/i386-1.C
gcc/testsuite/gcc.dg/i386-cpuid.h [deleted file]
gcc/testsuite/gcc.dg/torture/pr16104-1.c
gcc/testsuite/gcc.target/i386/mmx-4.c
gcc/testsuite/gcc.target/i386/mmx-check.h
gcc/testsuite/gcc.target/i386/sse-10.c
gcc/testsuite/gcc.target/i386/sse-6.c
gcc/testsuite/gcc.target/i386/sse-7.c
gcc/testsuite/gcc.target/i386/sse-check.h
gcc/testsuite/gcc.target/i386/sse2-check.h
gcc/testsuite/gcc.target/i386/sse3-check.h
gcc/testsuite/gcc.target/i386/sse4_1-check.h
gcc/testsuite/gcc.target/i386/sse4_2-check.h
gcc/testsuite/gcc.target/i386/sse4a-check.h
gcc/testsuite/gcc.target/i386/ssse3-check.h
libgomp/ChangeLog
libgomp/testsuite/libgomp.c/atomic-1.c
libgomp/testsuite/libgomp.c/atomic-2.c