From patchwork Wed May 1 18:41:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Bolton X-Patchwork-Id: 240798 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 98A782C00C7 for ; Thu, 2 May 2013 04:42:03 +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=sMC+0VPUkAbgWX2uFU1Z+1s8PYcrfHL+UOp1HJ6WzQkjbWxYUjnUd GaWfRdX01FPUYe9mJ15spocSfz8X1+sRy7E+09WAtdQXN69MYjLhE0wo3CRTeJ68 mNvQHhq9OV5+b4iC4zaps49QUoR5W1SBQ7oHAPof46m7WuPee6WM5A= 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=6GkPs8k9l6V4fv3ByhZ/G6MjEtY=; b=nXjnqCOjM0MBSAuM+UF2 Rbc+RITLqgU439ReR6rWVTYY73bjKR/G03IOWuxhUP07fQvpcCpbEl8un/TBzPpK 62bF8Ph/ls2gx2VhnfkKiiiDIq5j6DWJsvDuQZV+nPTO7ZlLsQ9+annPvK3mPrQn CJaWhkf1fEAhxe4xi2k6fOA= Received: (qmail 22309 invoked by alias); 1 May 2013 18:41:56 -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 22298 invoked by uid 89); 1 May 2013 18:41:56 -0000 X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, 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, 01 May 2013 18:41:55 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 01 May 2013 19:41:53 +0100 Received: from E102352xp ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 May 2013 19:41:52 +0100 From: "Ian Bolton" To: Subject: [PATCH, AArch64] Fix for LDR/STR to/from S and D registers Date: Wed, 1 May 2013 19:41:34 +0100 Message-ID: <000501ce469b$81cffd90$856ff8b0$@bolton@arm.com> MIME-Version: 1.0 X-MC-Unique: 113050119415300201 X-Virus-Found: No This is a fix for this patch: http://gcc.gnu.org/ml/gcc-patches/2013-04/msg01621.html If someone compiles with -mgeneral-regs-only then those instructions shouldn't be used. We can enforce that by adding the fp attribute to the relevant alternatives in the patterns. Regression tests all good. OK for trunk? Cheers, Ian 2013-05-01 Ian Bolton * config/aarch64/aarch64.md (movsi_aarch64): Only allow to/from S reg when fp attribute set. (movdi_aarch64): Only allow to/from D reg when fp attribute set. Index: gcc/config/aarch64/aarch64.md =================================================================== --- gcc/config/aarch64/aarch64.md (revision 198456) +++ gcc/config/aarch64/aarch64.md (working copy) @@ -825,7 +825,7 @@ (define_insn "*movsi_aarch64" fmov\\t%s0, %s1" [(set_attr "v8type" "move,alu,load1,load1,store1,store1,fmov,fmov,fmov") (set_attr "mode" "SI") - (set_attr "fp" "*,*,*,*,*,*,yes,yes,yes")] + (set_attr "fp" "*,*,*,yes,*,yes,yes,yes,yes")] ) (define_insn "*movdi_aarch64" @@ -850,7 +850,7 @@ (define_insn "*movdi_aarch64" movi\\t%d0, %1" [(set_attr "v8type" "move,move,move,alu,load1,load1,store1,store1,adr,adr,fmov,fmov,fmov,fmov") (set_attr "mode" "DI") - (set_attr "fp" "*,*,*,*,*,*,*,*,*,*,yes,yes,yes,yes")] + (set_attr "fp" "*,*,*,*,*,yes,*,yes,*,*,yes,yes,yes,yes")] ) (define_insn "insv_imm"