From patchwork Fri Oct 25 00:20:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Shevlyakov X-Patchwork-Id: 286052 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 did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A8CDE2C00CA for ; Fri, 25 Oct 2013 11:20:32 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=ESthT9DhOIrW8/HL5He2ETPMALk2kNzlQyMxnmFf8Dmt3h aFcBmOIQ1JJyLT13S1mUFjtdLR5JMczNNKijfC+2L7Ft+nB8OyII8JLm/3Azn9c6 K7lcdQ+k4XJJ3bFpOw65+mZv3wjgJICDueR2Plae4MiZx1DTkq5ied7WQ/rHA= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=yM40GdBbTsq/AcTRLRqHx1mvrAM=; b=Hp7MWwqe1/QkR1EGUMQU MGicqQ5kfKXNxHOkO8zA5ErhVQi1i5PYXflXFYCAkehLYPHRsCligqL/sSyxR539 KDRGuboMyDFIETg+NAN+ldbOeWpst9ZDI0Z8qpVZ0pcsuV7jTkECzFwzAteCUJIi vPdueL3k/UvZyY4mdOoo/ls= Received: (qmail 12708 invoked by alias); 25 Oct 2013 00:20:26 -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 12696 invoked by uid 89); 25 Oct 2013 00:20:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f172.google.com Received: from mail-we0-f172.google.com (HELO mail-we0-f172.google.com) (74.125.82.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 25 Oct 2013 00:20:25 +0000 Received: by mail-we0-f172.google.com with SMTP id q58so3142955wes.3 for ; Thu, 24 Oct 2013 17:20:22 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.126.103 with SMTP id mx7mr70656wib.39.1382660422026; Thu, 24 Oct 2013 17:20:22 -0700 (PDT) Received: by 10.227.20.197 with HTTP; Thu, 24 Oct 2013 17:20:21 -0700 (PDT) Date: Thu, 24 Oct 2013 17:20:21 -0700 Message-ID: Subject: [PATCH] fixing typo in expr.c to allow proper recognition of complex addresses in some arches. From: Igor Shevlyakov To: gcc-patches@gcc.gnu.org I stumbled on a case like this: If the multipliers allowed for addressing modes are dependent on actual mode, in some cases compiler refuses to recognize address as legitimate. It boils down to this place in expr.c where address_mode is incorrectly used instead of actual mode. I rebootstraped and tested on x86_64-linux-gnu but there's no testcase to see the improved behavior... Please patch the trunk. Thanks Igor ===== 2013-10-24 Igor Shevlyakov > * expr.c (expand_expr_real_1): Use proper memory access mode instead of address_mode in the call to memory_address_addr_space. Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 204036) +++ gcc/expr.c (working copy) @@ -9642,7 +9642,7 @@ expand_expr_real_1 (tree exp, rtx target } align = get_object_alignment (exp); op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM); - op0 = memory_address_addr_space (address_mode, op0, as); + op0 = memory_address_addr_space (mode, op0, as); if (!integer_zerop (TREE_OPERAND (exp, 1))) { rtx off