From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10289 invoked by alias); 29 May 2013 20:29:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10131 invoked by uid 89); 29 May 2013 20:29:09 -0000 X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ve0-f179.google.com (HELO mail-ve0-f179.google.com) (209.85.128.179) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 29 May 2013 20:29:09 +0000 Received: by mail-ve0-f179.google.com with SMTP id d10so4877767vea.24 for ; Wed, 29 May 2013 13:29:07 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.52.159.72 with SMTP id xa8mr2351350vdb.48.1369859347482; Wed, 29 May 2013 13:29:07 -0700 (PDT) Received: by 10.220.175.131 with HTTP; Wed, 29 May 2013 13:29:07 -0700 (PDT) In-Reply-To: <20130522164952.GA14241@ibm-tiger.the-meissners.org> References: <20130520204053.GA21090@ibm-tiger.the-meissners.org> <20130522164952.GA14241@ibm-tiger.the-meissners.org> Date: Wed, 29 May 2013 20:29:00 -0000 Message-ID: Subject: Re: [PATCH, rs6000] power8 patches, patch #7, quad/byte/half-word atomic instructions From: David Edelsohn To: Michael Meissner , GCC Patches , Pat Haugen , Peter Bergner Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-05/txt/msg01748.txt.bz2 - if (mode == QImode || mode == HImode) + /* On power8, we want to use SImode for the operation. On previoius systems, + use the operation in a subword and shift/mask to get the proper byte or + halfword. */ + if (TARGET_SYNC_HI_QI && (mode == QImode || mode == HImode)) + { + val = convert_modes (SImode, mode, val, 1); + + /* Prepare to adjust the return value. */ + before = gen_reg_rtx (SImode); + if (after) + after = gen_reg_rtx (SImode); + mode = SImode; + } + else if (mode == QImode || mode == HImode) Spelling: previoius. This logic is redundant. Why not if (mode == QImode || mode == HImode) { if (TARGET_SYNC_HI_QI) { new code } else { original code } The rest of this patch is okay. Thanks, David