r190632 - in /branches/google/gcc-4_7: ./ gcc/ ...
tmsriram@gcc.gnu.org
tmsriram@gcc.gnu.org
Thu Aug 23 22:21:00 GMT 2012
Author: tmsriram
Date: Thu Aug 23 22:21:55 2012
New Revision: 190632
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190632
Log:
Backport runtime CPU detection from trunk in revisions: r186789,r186795,r186855,r187365,r188417
This adds new builtins __builtin_cpu_is and __builtin_cpu_supports to detect the CPU at run-time.
Refer:
http://gcc.gnu.org/onlinedocs/gcc/X86-Built_002din-Functions.html#X86-Built_002din-Functions
for a description of the builtins.
2012-08-23 Sriraman Tallam <tmsriram@google.com>
Backport r186789,r186795,r186855,r187365,r188417
r186789:
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* config/i386/i386.c (build_processor_model_struct): New function.
(make_var_decl): New function.
(fold_builtin_cpu): New function.
(ix86_fold_builtin): New function.
(make_cpu_type_builtin): New function.
(ix86_init_platform_type_builtins): New function.
(ix86_expand_builtin): Expand new builtins by folding them.
(ix86_init_builtins): Make new builtins to detect CPU type.
(TARGET_FOLD_BUILTIN): New macro.
(IX86_BUILTIN_CPU_INIT): New enum value.
(IX86_BUILTIN_CPU_IS): New enum value.
(IX86_BUILTIN_CPU_SUPPORTS): New enum value.
* config/i386/i386-builtin-types.def: New function type.
* testsuite/gcc.target/builtin_target.c: New testcase.
* doc/extend.texi: Document builtins.
r186795:
No changes.
r186855:
2012-04-25 Sriraman Tallam <tmsriram@google.com>
* doc/extend.texi: Document avx2 support.
* config/i386/i386.c (fold_builtin_cpu): Add avx2.
* testsuite/gcc.target/i386/builtin_target.c: Check avx2.
r187365:
2012-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* doc/extend.texi (X86 Built-in Functions, __builtin_cpu_init):
Document requirement to call in constructors.
* config/i386/i386.c: Update comments for i386-cpuinfo.c name
change.
r188417:
2012-06-11 Sriraman Tallam <tmsriram@google.com>
* testsuite/gcc.target/i386/builtin_target.c (vendor_signatures): New enum.
(check_intel_cpu_model): New function.
(check_amd_cpu_model): New function.
(check_features): New function.
(__get_cpuid_output): New function.
(check_detailed): New function.
(fn1): Rename to quick_check.
(main): Update to call quick_check and call check_detailed.
2012-08-23 Sriraman Tallam <tmsriram@google.com>
Backport r186789,r186795,r186855,r187365,r188417
r186789:
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* libgcc/config/i386/i386-cpuinfo.c: New file.
* libgcc/config/i386/t-cpuinfo: New file.
* libgcc/config.host: Include t-cpuinfo.
* libgcc/config/i386/libgcc-glibc.ver: Version symbol __cpu_model.
r186795:
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always.
r186855:
2012-04-25 Sriraman Tallam <tmsriram@google.com>
* config/i386/i386-cpuinfo.c (FEATURE_AVX2): New enum value.
(get_available_features): New argument. Check for AVX2.
(__cpu_indicator_init): Modify call to get_available_features.
r187365:
2012-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.host (i[34567]86-*-linux*, x86_64-*-linux*)
(i[34567]86-*-kfreebsd*-gnu, x86_64-*-kfreebsd*-gnu)
(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*): Move
i386/t-cpuinfo ...
(i[34567]86-*-*, x86_64-*-*): ... here.
* config/i386/libgcc-bsd.ver (GCC_4.8.0): New version.
* config/i386/libgcc-sol2.ver (GCC_4.8.0): New version.
* config/i386/i386-cpuinfo.c: Rename to ...
* config/i386/cpuinfo.c: ... this.
* config/i386/t-cpuinfo (LIB2ADD): Reflect this.
* configure.ac (AC_CONFIG_HEADER): Call for auto-target.h.
(libgcc_cv_init_priority): New test.
* configure: Regenerate.
* config.in: New file.
* Makefile.in (clean): Rename config.h to auto-target.h.
(config.h): Likewise.
(stamp-h): Likewise.
* config/i386/cpuinfo.c (auto-target.h): Include.
(CONSTRUCTOR_PRIORITY): Define.
(__cpu_indicator_init): Use it.
r188417:
2012-06-11 Sriraman Tallam <tmsriram@google.com>
* config/i386/libgcc-bsd.ver: Version symbol __cpu_indicator_init.
* config/i386/libgcc-sol2.ver: Ditto.
* config/i386/libgcc-glibc.ver: Ditto.
Added:
branches/google/gcc-4_7/gcc/testsuite/gcc.target/i386/builtin_target.c
- copied, changed from r186789, trunk/gcc/testsuite/gcc.target/i386/builtin_target.c
branches/google/gcc-4_7/libgcc/config.in
- copied unchanged from r187365, trunk/libgcc/config.in
branches/google/gcc-4_7/libgcc/config/i386/cpuinfo.c
branches/google/gcc-4_7/libgcc/config/i386/t-cpuinfo
Modified:
branches/google/gcc-4_7/ (props changed)
branches/google/gcc-4_7/gcc/ (props changed)
branches/google/gcc-4_7/gcc/ChangeLog.google-4_7
branches/google/gcc-4_7/gcc/config/i386/i386-builtin-types.def
branches/google/gcc-4_7/gcc/config/i386/i386.c
branches/google/gcc-4_7/gcc/doc/extend.texi
branches/google/gcc-4_7/gcc/testsuite/gcc.target/powerpc/ppc-round.c (props changed)
branches/google/gcc-4_7/libgcc/ChangeLog.google-4_7
branches/google/gcc-4_7/libgcc/Makefile.in
branches/google/gcc-4_7/libgcc/config.host
branches/google/gcc-4_7/libgcc/config/i386/libgcc-bsd.ver
branches/google/gcc-4_7/libgcc/config/i386/libgcc-glibc.ver
branches/google/gcc-4_7/libgcc/config/i386/libgcc-sol2.ver
branches/google/gcc-4_7/libgcc/configure
branches/google/gcc-4_7/libgcc/configure.ac
branches/google/gcc-4_7/libjava/classpath/ (props changed)
Propchange: branches/google/gcc-4_7/
('svn:mergeinfo' modified)
Propchange: branches/google/gcc-4_7/gcc/
('svn:mergeinfo' modified)
Propchange: branches/google/gcc-4_7/gcc/testsuite/gcc.target/powerpc/ppc-round.c
('svn:mergeinfo' modified)
Propchange: branches/google/gcc-4_7/libjava/classpath/
('svn:mergeinfo' modified)
More information about the Gcc-cvs
mailing list