From patchwork Thu Feb 23 17:12:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 142676 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 28DC4B6EEE for ; Fri, 24 Feb 2012 04:12:45 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330621966; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Received-SPF:Received:MIME-Version:Received:Received:In-Reply-To: References:Date:Message-ID:Subject:From:To:Cc:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=wUEw6sF8YAug0BLo4yRt 8L4O5OE=; b=q/2m1gL1Voi/wgLaqCBDyx349eCmdY4ceNffLUNDiIkeeBQp6Tnj x/8nHVT1iSsIfMtuN3A9mH+1NBzEIOYLmQ3zA6Nm5LtsXHVcJqz9uh6NwUyWyc4b hEfQVi3M1x+1TvEralVSG/C67QZ7PbyyWSmwLyD5WTp/cmrzXXl1jVE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received-SPF:Authentication-Results:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=s69uS/Z8NS5McfoGektfSexKoc1X3vQIhk22PuF8OAErdFmWYrrp/vVEiSFEx8 hWfPjWKMOu4BMHyNgbXKW83aDaBEBoCD3BG+WRl/JDRpjRCm/e+MMCplOUjAqTf/ 98RsSYht/UU1haxZwHddPhdvfxaAPnpS/AwGDjFeNLPPE=; Received: (qmail 2421 invoked by alias); 23 Feb 2012 17:12:40 -0000 Received: (qmail 2401 invoked by uid 22791); 23 Feb 2012 17:12:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f175.google.com (HELO mail-tul01m020-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Feb 2012 17:12:24 +0000 Received: by obhx4 with SMTP id x4so1771669obh.20 for ; Thu, 23 Feb 2012 09:12:24 -0800 (PST) Received-SPF: pass (google.com: domain of ktietz70@googlemail.com designates 10.182.231.38 as permitted sender) client-ip=10.182.231.38; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ktietz70@googlemail.com designates 10.182.231.38 as permitted sender) smtp.mail=ktietz70@googlemail.com; dkim=pass header.i=ktietz70@googlemail.com Received: from mr.google.com ([10.182.231.38]) by 10.182.231.38 with SMTP id td6mr824039obc.47.1330017144356 (num_hops = 1); Thu, 23 Feb 2012 09:12:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.231.38 with SMTP id td6mr722970obc.47.1330017144309; Thu, 23 Feb 2012 09:12:24 -0800 (PST) Received: by 10.182.33.103 with HTTP; Thu, 23 Feb 2012 09:12:24 -0800 (PST) In-Reply-To: References: <20120223164141.GS18768@tyan-ft48-01.lab.bos.redhat.com> Date: Thu, 23 Feb 2012 18:12:24 +0100 Message-ID: Subject: Re: [patch i386]: Add support of delegitimize of UNSPEC_PCREL plus displacement From: Kai Tietz To: Jakub Jelinek Cc: GCC Patches , Richard Henderson 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 Hi, So tests are complete (with full test on x86_64-unknown-linux-gnu and testfailure testing on i686-w64-mingw32 and x86_64-w64-mingw32). ChangeLog 2012-02-23 Kai Tietz * config/i386/i386.c (ix86_delegitimize_address): Handle UNSPEC_PCREL plus displacement. Regression tested for x86_64-w64-mingw32, and x86_64-unknown-linux-gnu. Ok for apply? Regards, Kai Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 184486) +++ config/i386/i386.c (working copy) @@ -13241,6 +13241,19 @@ if (TARGET_64BIT) { + if (GET_CODE (x) == CONST + && GET_CODE (XEXP (x, 0)) == PLUS + && GET_MODE (XEXP (x, 0)) == Pmode + && CONST_INT_P (XEXP (XEXP (x, 0), 1)) + && GET_CODE (XEXP (XEXP (x, 0), 0)) == UNSPEC + && XINT (XEXP (XEXP (x, 0), 0), 1) == UNSPEC_PCREL) + { + rtx x2 = XVECEXP (XEXP (XEXP (x, 0), 0), 0, 0); + x = gen_rtx_PLUS (Pmode, XEXP (XEXP (x, 0), 1), x2); + if (MEM_P (orig_x)) + x = replace_equiv_address_nv (orig_x, x); + return x; + } if (GET_CODE (x) != CONST || GET_CODE (XEXP (x, 0)) != UNSPEC || (XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL