From patchwork Wed May 22 15:18:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Bolton X-Patchwork-Id: 245644 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2FB152C0099 for ; Thu, 23 May 2013 01:19:38 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=b23EQdU9biR5pH8p5RSaASn5z5MclcjaMnb/qEiEX7/28xg+nbmxb 3Kt0XS4a7oeuxcrJi9RM4uxXJNKFskz1GLD5Lxbs2Ec70X9rg8jp7DRgZNc3jlKW IRrPupYKscKqnknwBw5FDhVGQCkFlyNa5EFSANr3RmoW2Lt+Q6a2cs= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=SicPQRxra4bZhekrUKKPD+LbtbQ=; b=RoQbYI8B3EFTeJCHsWK7 UikdXezc1UFzszfXvYosmwMwCJa1Lu1xpVSnGbtniLNGnQsWoqUX0k0Gt23bZs9n sB4Is+3mBCXdHWQ1zJf3JCtj1LnAIZKFwylQmFT1356pBm8a/CfGYGik9no0PNl4 +VAHG16cv7Mjh0pl62IeuZc= Received: (qmail 5405 invoked by alias); 22 May 2013 15:19:30 -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 5395 invoked by uid 89); 22 May 2013 15:19:29 -0000 X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.1 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 15:19:28 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 22 May 2013 16:19:26 +0100 Received: from E102352xp ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 May 2013 16:19:25 +0100 From: "Ian Bolton" To: Subject: [PATCH, AArch64] Fix invalid assembler in scalar_intrinsics.c test Date: Wed, 22 May 2013 16:18:56 +0100 Message-ID: <000001ce56ff$adb6f160$0924d420$@bolton@arm.com> MIME-Version: 1.0 X-MC-Unique: 113052216192600701 X-Virus-Found: No The test file scalar_intrinsics.c (in gcc.target/aarch64) is currently compile-only. If you attempt to make it run, as opposed to just generate assembler, you can't because it won't assemble. There are two issues causing trouble here: 1) Use of invalid instruction "mov d0, d1". It should be "mov d0, v1.d[0]". 2) The vdupd_lane_s64 and vdupd_lane_u64 calls are being given a lane that is out of range, which causes invalid assembler output. This patch fixes both, so that we can build on this to make executable test cases for scalar intrinsics. OK for trunk? Cheers, Ian 2013-05-22 Ian Bolton testsuite/ * gcc.target/aarch64/scalar_intrinsics.c (force_simd): Use a valid instruction. (test_vdupd_lane_s64): Pass a valid lane argument. (test_vdupd_lane_u64): Likewise. diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c index 7427c62..16537ce 100644 --- a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c +++ b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c @@ -4,7 +4,7 @@ #include /* Used to force a variable to a SIMD register. */ -#define force_simd(V1) asm volatile ("mov %d0, %d1" \ +#define force_simd(V1) asm volatile ("mov %d0, %1.d[0]" \ : "=w"(V1) \ : "w"(V1) \ : /* No clobbers */); @@ -228,13 +228,13 @@ test_vdups_lane_u32 (uint32x4_t a) int64x1_t test_vdupd_lane_s64 (int64x2_t a) { - return vdupd_lane_s64 (a, 2); + return vdupd_lane_s64 (a, 1); } uint64x1_t test_vdupd_lane_u64 (uint64x2_t a) { - return vdupd_lane_u64 (a, 2); + return vdupd_lane_u64 (a, 1); } /* { dg-final { scan-assembler-times "\\tcmtst\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 } } */