support for AMD clzero isa.
authorVictoria Stepanyan <victoria.stepanyan@amd.com>
Sun, 6 Dec 2015 17:02:48 +0000 (17:02 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Sun, 6 Dec 2015 17:02:48 +0000 (17:02 +0000)
commit62e56a0d652ce83ae3d220cc4a01de46674188f1
treecaf97ab569ab5baf08a9753bd71ed1d4c81deee5
parent2097a8906f26415d7ad36f485ad7841ed5142fba
support for AMD clzero isa.

gcc/ChangeLog
2015-12-06  Victoria Stepanyan  <victoria.stepanyan@amd.com>

        * common/config/i386/i386-common.c
        (OPTION_MASK_ISA_CLZERO_SET): New.
        (ix86_handle_option): Handle clzero.
        * config.gcc (i[34567]86-*-*): Add clzerointrin.h,
        (x86_64-*-*): Likewise.
        * config/i386/clzerointrin.h: New header.
        * config/i386/cpuid.h (bit_CLZERO):  Define.
        * config/i386/driver-i386.c (host_detect_local_cpu): Detect
        CLZERO support.
        * config/i386/i386.opt (clzero): New.
        * config/i386/i386-c.c: Define __CLZERO__ if needed.
        * config/i386/i386.c (ix86_target_string): Define -mclzero option.
        (PTA_CLZERO): New.
        (ix86_option_override_internal): Handle new option.
        (processor_alias_table): Added PTA_CLZERO.
        (ix86_valid_target_attribute_inner_p): Add OPT_mclzero.
        (ix86_builtins): Add IX86_BUILTIN_CLZERO, IX86_BUILTIN_CLZERO.
        (ix86_expand_builtin): Handle IX86_BUILTIN_CLZERO and
        IX86_BUILTIN_CLZERO  built-ins.
        * config/i386/i386.h (TARGET_CLZERO):  New.
        * config/i386/i386.md (unspecv): Add UNSPEC_CLZERO.
        (clzero):  New pattern.
        (clzero_<mode>): New pattern.
        * config/i386/x86intrin.h: Include clzerointrin.h.
        * doc/extend.texi: Document clzero builtins.
        * doc/invoke.texi: Document -mclzero option.

gcc/testsuite/ChangeLog
2015-12-06  Victoria Stepanyan  <victoria.stepanyan@amd.com>

        * gcc.target/i386/clzero.c: New.
        * gcc.target/i386/sse-12.c: Add -mclzero.
        * gcc.target/i386/sse-13.c: Ditto.
        * gcc.target/i386/sse-14.c: Ditto.
        * gcc.target/i386/sse-22.c: Ditto.
        * gcc.target/i386/sse-23.c: Ditto.
        * g++.dg/other/i386-2.C: Ditto.
        * g++.dg/other/i386-3.C: Ditto.

From-SVN: r231340
19 files changed:
gcc/ChangeLog
gcc/common/config/i386/i386-common.c
gcc/config.gcc
gcc/config/i386/clzerointrin.h [new file with mode: 0644]
gcc/config/i386/i386-c.c
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/config/i386/i386.opt
gcc/config/i386/x86intrin.h
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/i386-2.C
gcc/testsuite/g++.dg/other/i386-3.C
gcc/testsuite/gcc.target/i386/clzero.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse-12.c
gcc/testsuite/gcc.target/i386/sse-13.c
gcc/testsuite/gcc.target/i386/sse-14.c
gcc/testsuite/gcc.target/i386/sse-23.c