From patchwork Sat Dec 17 20:13:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 132022 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]) by ozlabs.org (Postfix) with SMTP id B66B21007D1 for ; Sun, 18 Dec 2011 07:14:12 +1100 (EST) Received: (qmail 29310 invoked by alias); 17 Dec 2011 20:14:06 -0000 Received: (qmail 29284 invoked by uid 22791); 17 Dec 2011 20:14:05 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SARE_HTML_INV_TAG, UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mailout09.t-online.de (HELO mailout09.t-online.de) (194.25.134.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Dec 2011 20:13:50 +0000 Received: from fwd23.aul.t-online.de (fwd23.aul.t-online.de ) by mailout09.t-online.de with smtp id 1Rc0df-0002yy-1U; Sat, 17 Dec 2011 21:13:47 +0100 Received: from [192.168.0.104] (E4R+pvZbwh9hALZ90lnrh65veT9AOIiVuqOYQTlQebjhhOsPfU4nIYYbCZayDMMQa5@[93.218.173.162]) by fwd23.t-online.de with esmtp id 1Rc0da-10kRwO0; Sat, 17 Dec 2011 21:13:42 +0100 Subject: Re: [patch committed SH] Add atomic patterns From: Oleg Endo To: Kaz Kojima Cc: gcc-patches@gcc.gnu.org In-Reply-To: <1324141935.18753.306.camel@yam-132-YW-E178-FTW> References: <20111205.080727.470553350.kkojima@rr.iij4u.or.jp> <1324141935.18753.306.camel@yam-132-YW-E178-FTW> Date: Sat, 17 Dec 2011 21:13:39 +0100 Message-ID: <1324152819.18753.322.camel@yam-132-YW-E178-FTW> Mime-Version: 1.0 X-IsSubscribed: yes 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 The attached patch should fix the align 2 issues mentioned before and also fixes the ior fetchop_name. It should be "or" instead of "ior". I'm not sure whether it requires re-testing. Just in case now running: make -k -check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml/-msoft-atomic, -m2/-mb/-msoft-atomic, -m2a-single/-mb/-msoft-atomic, -m4-single/-ml/-msoft-atomic, -m4-single/-mb/-msoft-atomic, -m4a-single/-ml, -m4a-single/-mb/-msoft-atomic}" Cheers, Oleg ChangeLog: 2011-12-17 Oleg Endo * config/sh/sync.md (fetchop_name): Change "ior" to "or". (atomic_compare_and_swap_soft, atomic_fetch__soft, atomic_fetch_nand_soft, atomic__fetch_soft, atomic_nand_fetch_soft): Move align 2 above atomic sequence entrance. Index: gcc/config/sh/sync.md =================================================================== --- gcc/config/sh/sync.md (revision 182438) +++ gcc/config/sh/sync.md (working copy) @@ -35,7 +35,7 @@ (define_code_iterator FETCHOP [plus minus ior xor and]) (define_code_attr fetchop_name - [(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")]) + [(plus "add") (minus "sub") (ior "or") (xor "xor") (and "and")]) (define_code_attr fetchop_insn [(plus "add") (minus "sub") (ior "or") (xor "xor") (and "and")]) @@ -90,13 +90,13 @@ return \"\\ mova\\t1f, r0\\n\\ \\t\\t%2, %4\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.\\t@%1, %0\\n\\ \\tcmp/eq\\t%0, %4\\n\\ \\tbf\\t1f\\n\\ \\tmov.\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "20")]) @@ -142,13 +142,13 @@ { return \"\\ mova\\t1f, r0\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.\\t@%1, %0\\n\\ \\tmov\\t%0, %3\\n\\ \\t\\t%2, %3\\n\\ \\tmov.\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "18")]) @@ -195,13 +195,13 @@ return \"\\ mova\\t1f, r0\\n\\ \\tmov\\tr15, r1\\n\\ +\\t.align\\t2\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.\\t@%1, %0\\n\\ \\tmov\\t%2, %3\\n\\ \\tand\\t%0, %3\\n\\ \\tnot\\t%3, %3\\n\\ \\tmov.\\t%3, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "20")]) @@ -249,11 +249,11 @@ return \"\\ mova\\t1f, r0\\n\\ \\tmov\\tr15, r1\\n\\ +\\t.align\\t2\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.\\t@%1, %0\\n\\ \\t\\t%2, %0\\n\\ \\tmov.\\t%0, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "16")]) @@ -300,13 +300,13 @@ { return \"\\ mova\\t1f, r0\\n\\ +\\t.align\\t2\\n\\ \\tmov\\tr15, r1\\n\\ \\tmov\\t#(0f-1f), r15\\n\\ 0:\\tmov.\\t@%1, %0\\n\\ \\tand\\t%2, %0\\n\\ \\tnot\\t%0, %0\\n\\ \\tmov.\\t%0, @%1\\n\\ -\\t.align\\t2\\n\\ 1:\\tmov\tr1, r15\"; }" [(set_attr "length" "18")])