From patchwork Thu Dec 4 15:22:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Enkovich X-Patchwork-Id: 417829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 111231400D5 for ; Fri, 5 Dec 2014 02:22:30 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=F6YONgZSgCK3F+41u NF0KgC4v00tgSV/klz0q9kk0x+4ono/QWch3O3cp1Xuv1tL7a7uLSLfBc7lv8vWs 1zAOjfbBrf6Mwq1jY58O18Xb5IEH4rdDF/JGWi2wxUzCIOIx3D6nfOCtf38HZ4iY yhP6i9oHiv7VYCm8eRLPOer/u8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=H+olVBdVpDdpA7h/ikrlwpu 5t5w=; b=mpzP98R7oQVmuk29P5bl008JhekuEs1brGQX5Frk1Wxy7yKC/aEbeCi dCJewYNU51OyQxS2U2EI0pbwkrxwVBgHi+zwo+ZpxqaayzZBZyJxDDdeB8FBtJS4 TbI83HzgncgHtUIN9jgtJxERSN38deYmjGqg/jIY7qv3RgInP090= Received: (qmail 27709 invoked by alias); 4 Dec 2014 15:22:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27700 invoked by uid 89); 4 Dec 2014 15:22:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f51.google.com Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 04 Dec 2014 15:22:21 +0000 Received: by mail-pa0-f51.google.com with SMTP id ey11so18299204pad.10 for ; Thu, 04 Dec 2014 07:22:19 -0800 (PST) X-Received: by 10.67.3.165 with SMTP id bx5mr19423654pad.59.1417706539250; Thu, 04 Dec 2014 07:22:19 -0800 (PST) Received: from msticlxl57.ims.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by mx.google.com with ESMTPSA id du16sm11288265pdb.8.2014.12.04.07.22.17 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Dec 2014 07:22:18 -0800 (PST) Date: Thu, 4 Dec 2014 18:22:09 +0300 From: Ilya Enkovich To: Rainer Orth Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix the rest of PR target/64056 Message-ID: <20141204152209.GA53395@msticlxl57.ims.intel.com> References: <20141204141000.GA44742@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On 04 Dec 15:58, Rainer Orth wrote: > Hi Ilya, > > > > This patch adds a check for stpcpy function into > > gcc.target/i386/chkp-strlen-2.c test. > > > > make check RUNTESTFLAGS="i386.exp=chkp-strlen-2.c" is OK. OK for trunk? > > > > Thanks, > > Ilya > > -- > > 2014-12-04 Ilya Enkovich > > > > PR target/64056 > > * lib/target-supports.exp (check_effective_target_stpcpy): New. > > new effective-target keywords need documentation in sourcebuild.texi. > > Rainer > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University Thanks for the notice! I see there is also no description for mempcpy target check. So add both of them. Thanks, Ilya --- gcc/ 2014-12-04 Ilya Enkovich PR target/64056 * doc/sourcebuild.texi: Add mempcpy and stpcpy for Effective-Target Keywords. gcc/testsuite/ 2014-12-04 Ilya Enkovich PR target/64056 * lib/target-supports.exp (check_effective_target_stpcpy): New. * gcc.target/i386/chkp-strlen-2.c: Add stpcpy target check. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 20a206d..797d3ee 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1761,6 +1761,9 @@ Target might have errors of a few ULP in string to floating-point conversion functions and overflow is not always detected correctly by those functions. +@item mempcpy +Target provides @code{mempcpy} function. + @item mmap Target supports @code{mmap}. @@ -1790,6 +1793,9 @@ Target has the basic signed and unsigned C types in @code{stdint.h}. This will be obsolete when GCC ensures a working @code{stdint.h} for all targets. +@item stpcpy +Target provides @code{stpcpy} function. + @item trampolines Target supports trampolines. diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c index 1ce426d..67691ee 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target mpx } */ +/* { dg-require-effective-target stpcpy } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ /* { dg-final { cleanup-tree-dump "strlen" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ac04d95..0a911c1 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5856,6 +5856,12 @@ proc check_effective_target_mempcpy {} { return [check_function_available "mempcpy"] } +# Returns 1 if "stpcpy" is available on the target system. + +proc check_effective_target_stpcpy {} { + return [check_function_available "stpcpy"] +} + # Check whether the vectorizer tests are supported by the target and # append additional target-dependent compile flags to DEFAULT_VECTCFLAGS. # Set dg-do-what-default to either compile or run, depending on target