From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92224 invoked by alias); 25 Nov 2015 17:32:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 92190 invoked by uid 89); 25 Nov 2015 17:32:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_80,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f172.google.com Received: from mail-ob0-f172.google.com (HELO mail-ob0-f172.google.com) (209.85.214.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 25 Nov 2015 17:32:23 +0000 Received: by obbww6 with SMTP id ww6so44186412obb.0 for ; Wed, 25 Nov 2015 09:32:21 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.97.233 with SMTP id ed9mr26284487oeb.32.1448472741520; Wed, 25 Nov 2015 09:32:21 -0800 (PST) Received: by 10.60.138.6 with HTTP; Wed, 25 Nov 2015 09:32:21 -0800 (PST) Date: Wed, 25 Nov 2015 17:34:00 -0000 Message-ID: Subject: Re: Add support for CLZERO ISA From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: "Stepanyan, Victoria" , "Kumar, Venkataramanan" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-11/txt/msg03125.txt.bz2 Hello! > 2015-11-25 Victoria Stepanyan > > * 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_): 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-11-25 Victoria Stepanyan > > * 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. > > Ok for trunk ? OK for mainline SVN with a few issues, mentioned below fixed. @@ -5902,6 +5905,7 @@ IX86_ATTR_ISA ("clwb", OPT_mclwb), IX86_ATTR_ISA ("pcommit", OPT_mpcommit), IX86_ATTR_ISA ("mwaitx", OPT_mmwaitx), + IX86_ATTR_ISA ("clzero", OPT_mclzero), Please use tab instead of spaces before OPT_mclzero. @@ -116,8 +116,8 @@ #define TARGET_SHA_P(x) TARGET_ISA_SHA_P(x) #define TARGET_CLFLUSHOPT TARGET_ISA_CLFLUSHOPT #define TARGET_CLFLUSHOPT_P(x) TARGET_ISA_CLFLUSHOPT_P(x) -#define TARGET_CLZERO TARGET_ISA_CLZERO -#define TARGET_CLZERO_P(x) TARGET_ISA_CLZERO_P(x) +#define TARGET_CLZERO TARGET_ISA_CLZERO +#define TARGET_CLZERO_P(x) TARGET_ISA_CLZERO_P(x) #define TARGET_XSAVEC TARGET_ISA_XSAVEC #define TARGET_XSAVEC_P(x) TARGET_ISA_XSAVEC_P(x) #define TARGET_XSAVES TARGET_ISA_XSAVES Unwanted change. +;; CLZERO +(define_insn "clzero_" + [(unspec_volatile [(match_operand:P 0 "register_operand" "a")] + UNSPECV_CLZERO)] + "TARGET_CLZERO" + "clzero" + [(set_attr "memory" "unknown")]) + Please also add (probably invariant) "length" attribute, see e.g. mwaitx insn. @@ -310,7 +310,7 @@ -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol -fsanitize-undefined-trap-on-error @gol --fcheck-pointer-bounds -fchecking -fchkp-check-incomplete-type @gol +-fcheck-pointer-bounds -fchkp-check-incomplete-type @gol -fchkp-first-field-has-own-bounds -fchkp-narrow-bounds @gol -fchkp-narrow-to-innermost-array -fchkp-optimize @gol -fchkp-use-fast-string-functions -fchkp-use-nochk-string-functions @gol Unwanted change. @@ -6145,12 +6145,6 @@ functions for controlling the Pointer Bounds Checker. @xref{Pointer Bounds Checker builtins}, for more information. -@item -fchecking -@opindex fchecking -@opindex fno-checking -Enable internal consistency checking. The default depends on -the compiler configuration. - @item -fchkp-check-incomplete-type @opindex fchkp-check-incomplete-type @opindex fno-chkp-check-incomplete-type Unwanted change. Thanks, Uros.