From patchwork Tue Dec 9 15:27:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Baylis X-Patchwork-Id: 42053 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 946EC25E75 for ; Tue, 9 Dec 2014 15:28:54 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf656962wgg.0 for ; Tue, 09 Dec 2014 07:28:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results; bh=MhjHOlYVtuxa3FAVGpF9evIQdfV1V3g7sHQiTKUcsVM=; b=DdgMikd2p5HysjkwhWiiI61UK/aRc9DjBtvhN9aiCgboxc1n8p2KE711q5ibrXr69N w/J5b5Y31OA9LT2UHqmlkFZ52Df07GEMnJoBl/LN2aBFa4nR7QJx27X5+YLilGuTULsW VUfX3ydckvmI/zbEifZeJ2lwKAm2k5jCCmXKMkt/Bv34StpBMBtUrIiovhxVvSXXRZlT W3AvsYgsF2SIWCZigDEy5rK+ys9pGyjdC70YGiZTtAC32Jr5DuGLLRT0y6OB5hbLosGF 6SMLRuMwsppmmgl7M4vIWRDNaX/iXTuKTiYk2rdY5DstDHTlraYGjRJDrUoxt42B9OLh oEUw== X-Gm-Message-State: ALoCoQmrSuGlM9nlFrS5XA866NlG9oPctucnNJM/YZYeVWkqGmuSjpepTZ3vU5iwP6F8RoREa7pX X-Received: by 10.180.89.211 with SMTP id bq19mr4552823wib.4.1418138933848; Tue, 09 Dec 2014 07:28:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.229 with SMTP id p5ls54706laf.4.gmail; Tue, 09 Dec 2014 07:28:53 -0800 (PST) X-Received: by 10.152.121.65 with SMTP id li1mr22318980lab.17.1418138933692; Tue, 09 Dec 2014 07:28:53 -0800 (PST) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com. [2a00:1450:4010:c03::22f]) by mx.google.com with ESMTPS id b9si1661859lah.61.2014.12.09.07.28.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Dec 2014 07:28:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22f as permitted sender) client-ip=2a00:1450:4010:c03::22f; Received: by mail-la0-f47.google.com with SMTP id hz20so706809lab.6 for ; Tue, 09 Dec 2014 07:28:53 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr22081286lbc.66.1418138933278; Tue, 09 Dec 2014 07:28:53 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp767603lbc; Tue, 9 Dec 2014 07:28:52 -0800 (PST) X-Received: by 10.68.138.229 with SMTP id qt5mr6544491pbb.62.1418138931411; Tue, 09 Dec 2014 07:28:51 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id my7si2216279pdb.197.2014.12.09.07.28.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Dec 2014 07:28:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-386966-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 12467 invoked by alias); 9 Dec 2014 15:28:05 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 12331 invoked by uid 89); 9 Dec 2014 15:28:04 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 09 Dec 2014 15:28:03 +0000 Received: by mail-wi0-f176.google.com with SMTP id ex7so8254814wid.3 for ; Tue, 09 Dec 2014 07:28:00 -0800 (PST) X-Received: by 10.180.95.97 with SMTP id dj1mr5164331wib.43.1418138880313; Tue, 09 Dec 2014 07:28:00 -0800 (PST) Received: from sale.linaroharston ([81.128.185.34]) by mx.google.com with ESMTPSA id jp3sm14246558wid.9.2014.12.09.07.27.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Dec 2014 07:27:59 -0800 (PST) From: charles.baylis@linaro.org To: rearnsha@arm.com, gcc-patches@gcc.gnu.org, marcus.shawcroft@arm.com, tejas.belagod@arm.com, alan.lawrence@arm.com Subject: [PATCH 2/4] vldN_lane error message enhancements (D registers) Date: Tue, 9 Dec 2014 15:27:52 +0000 Message-Id: <1418138874-13285-3-git-send-email-charles.baylis@linaro.org> In-Reply-To: <1418138874-13285-1-git-send-email-charles.baylis@linaro.org> References: <1418138874-13285-1-git-send-email-charles.baylis@linaro.org> X-IsSubscribed: yes X-Original-Sender: charles.baylis@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22f as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 From: Charles Baylis gcc/ChangeLog Charles Baylis * config/aarch64/arm_neon.h (__LD2_LANE_FUNC): Add explicit lane bounds check. (__LD3_LANE_FUNC): Likewise. (__LD4_LANE_FUNC): Likewise gcc/testsuite/ChangeLog: Charles Baylis * gcc.target/aarch64/simd/vld4_lane.c: New test. Change-Id: Ia95fbed34b50cf710ea9032ff3428a5f1432e0aa --- gcc/config/aarch64/arm_neon.h | 6 ++++++ gcc/testsuite/gcc.target/aarch64/simd/vld4_lane.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/simd/vld4_lane.c diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index 8cff719..22df564 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -17901,6 +17901,8 @@ vld2_lane_##funcsuffix (const ptrtype * __ptr, intype __b, const int __c) \ __o = __builtin_aarch64_set_qregoi##mode (__o, \ (signedtype) __temp.val[1], \ 1); \ + __builtin_aarch64_im_lane_boundsi (__c, \ + sizeof (vectype) / sizeof (*__ptr)); \ __o = __builtin_aarch64_ld2_lane##mode ( \ (__builtin_aarch64_simd_##ptrmode *) __ptr, __o, __c); \ __b.val[0] = (vectype) __builtin_aarch64_get_dregoidi (__o, 0); \ @@ -17991,6 +17993,8 @@ vld3_lane_##funcsuffix (const ptrtype * __ptr, intype __b, const int __c) \ __o = __builtin_aarch64_set_qregci##mode (__o, \ (signedtype) __temp.val[2], \ 2); \ + __builtin_aarch64_im_lane_boundsi (__c, \ + sizeof (vectype) / sizeof (*__ptr)); \ __o = __builtin_aarch64_ld3_lane##mode ( \ (__builtin_aarch64_simd_##ptrmode *) __ptr, __o, __c); \ __b.val[0] = (vectype) __builtin_aarch64_get_dregcidi (__o, 0); \ @@ -18089,6 +18093,8 @@ vld4_lane_##funcsuffix (const ptrtype * __ptr, intype __b, const int __c) \ __o = __builtin_aarch64_set_qregxi##mode (__o, \ (signedtype) __temp.val[3], \ 3); \ + __builtin_aarch64_im_lane_boundsi (__c, \ + sizeof (vectype) / sizeof (*__ptr)); \ __o = __builtin_aarch64_ld4_lane##mode ( \ (__builtin_aarch64_simd_##ptrmode *) __ptr, __o, __c); \ __b.val[0] = (vectype) __builtin_aarch64_get_dregxidi (__o, 0); \ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vld4_lane.c b/gcc/testsuite/gcc.target/aarch64/simd/vld4_lane.c new file mode 100644 index 0000000..d14e6c1 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vld4_lane.c @@ -0,0 +1,15 @@ +/* Test error message when passing an invalid value as a lane index. */ + +/* { dg-do compile } */ + +#include + +int8x8x4_t +f_vld4_lane (int8_t * p, int8x8x4_t v) +{ + int8x8x4_t res; + /* { dg-error "lane 8 out of range 0 - 7" "" { target *-*-* } 0 } */ + res = vld4_lane_s8 (p, v, 8); + return res; +} +