From patchwork Wed Oct 12 15:29:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 681352 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 3svHpS58Ylz9rxl for ; Thu, 13 Oct 2016 02:29:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=W412yno7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=rFq78A7z1/rgYExpS /JHFsCYtw7aAzsGCnsTM0FB0F3S/Lx3QnAjKSvTQ+xX3c+dzzF1dDpBTz8HTN8z1 nmhgOqEcZa3Xllx+2xitnaNvptIxP+Ucdy4kfmky1S4gBXqd6N3z7HTVU+milxOT 5ndBWmg7QYPVuMk0xGucHqXRf0= 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=Kl3LViD0GW75Bd8GtSTGR00 U/Ps=; b=W412yno7SlubQ/vhkGptcFtc1WD25p5FNBZxFOfAcLfMQf92cwIKrGT rNyWPbla1zy64O6DevZkLDxbrYiC2vKF+/f8/SlCmDDHKUW22q/+W8xNXw2K8eJH 6ixVd80kfapdqw/YmmpS5VtVb6CfBKhGfdUMF9hIpCGJxOuONFDk= Received: (qmail 127549 invoked by alias); 12 Oct 2016 15:29:12 -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 127533 invoked by uid 89); 12 Oct 2016 15:29:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=BAYES_20, KAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=thomas.preudhomme@arm.com, thomaspreudhommearmcom, numbered, 74 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Oct 2016 15:29:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A716716; Wed, 12 Oct 2016 08:29:04 -0700 (PDT) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E6D423F251; Wed, 12 Oct 2016 08:29:03 -0700 (PDT) Subject: Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" References: <2f7b87e8-a6ae-c1fc-1c66-4ec7475f5252@foss.arm.com> <57FE55DD.1010903@foss.arm.com> From: Thomas Preudhomme Message-ID: Date: Wed, 12 Oct 2016 16:29:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <57FE55DD.1010903@foss.arm.com> X-IsSubscribed: yes Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: > > On 12/10/16 16:21, Thomas Preudhomme wrote: >> Hi, >> >> As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big >> endian targets. This is because on big endian targets the low bits of a 64bit >> value would be in the highest numbered register of a pair rather than the >> lowest numbered register as on little endian targets. This patch fixes that by >> allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok >> instead of arm_thumb2 to allow the test on ARM mode targets. >> >> ChangeLog entry is as follows: >> >> >> *** gcc/testsuite/ChangeLog *** >> >> 2016-10-11 Thomas Preud'homme >> >> * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. >> * gcc.target/arm/movsi_movw.c: Likewise. >> * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler >> directive to work on big endian targets. >> >> >> Tested testcases with armeb-none-eabi for -march=armv8-a. >> >> Is this ok for trunk? >> >> Best regards, >> >> Thomas >> > > -ERRNOPATCH. > Thanks, > Kyrill diff --git a/gcc/testsuite/gcc.target/arm/movdi_movw.c b/gcc/testsuite/gcc.target/arm/movdi_movw.c index 0f6b839da614c56766e92e3da125551df47890fc..253d0b26d2ebbd0e2c006b79e7cd2fc8312ff828 100644 --- a/gcc/testsuite/gcc.target/arm/movdi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movdi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ long long @@ -7,4 +7,4 @@ movdi (int a) return 0xF0F0; } -/* { dg-final { scan-assembler-times "movw\tr0, #61680" 1 } } */ +/* { dg-final { scan-assembler-times "movw\tr\[01\], #61680" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/movhi_movw.c b/gcc/testsuite/gcc.target/arm/movhi_movw.c index b097a8a019c74507f0c182af6ba5cf526369564b..d0d2bbb418e0d76b5438c5fcd84b4ee069b01ac7 100644 --- a/gcc/testsuite/gcc.target/arm/movhi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movhi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ short diff --git a/gcc/testsuite/gcc.target/arm/movsi_movw.c b/gcc/testsuite/gcc.target/arm/movsi_movw.c index d50906e76ab412ead71ff576d2f28d520234f58d..349705813971d035235898bf40771b1b17b64cca 100644 --- a/gcc/testsuite/gcc.target/arm/movsi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movsi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ int