From patchwork Mon Mar 5 09:38:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 144634 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 9A569B6EF1 for ; Mon, 5 Mar 2012 20:38:30 +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=1331545112; 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=kbIc4A+6p9OS2LB6qTUO vPJDJ5w=; b=HhQTk3F9Gvh3DUOwwzxggGsCFDZSiYHl+vFL1cVm2JWwYeLt6zFE 5YjpUqiVdEHvV4r2OxztuHUg6mP2817Q7yLTZ4s5bq647LHRIxz1mrXWC67EkGCO Ubue3fwOcD5kRYlgXd+mO1Y72b8sBZf351MYmJRV+Akc64qZ1NmxWJs= 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:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=eEn53VHls03iKGV0lbgjy8I7yeftZmjRl20mGQfm/CsvTl4FvDlleIYkbpSZ2w 0VtMHA3aq2VnBHeehFp426f8zLH8BfgC7ke+I1kZlHkKZUDmE5s10KMO6lq6W6rS cO/S3IFp25BuJLGNNPYOWDiztZQ2+leu2t+k15mytdYgA=; Received: (qmail 31630 invoked by alias); 5 Mar 2012 09:38:25 -0000 Received: (qmail 31616 invoked by uid 22791); 5 Mar 2012 09:38:24 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Mar 2012 09:38:11 +0000 Received: by ggcy3 with SMTP id y3so1548527ggc.20 for ; Mon, 05 Mar 2012 01:38:11 -0800 (PST) Received-SPF: pass (google.com: domain of ubizjak@gmail.com designates 10.236.134.211 as permitted sender) client-ip=10.236.134.211; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ubizjak@gmail.com designates 10.236.134.211 as permitted sender) smtp.mail=ubizjak@gmail.com; dkim=pass header.i=ubizjak@gmail.com Received: from mr.google.com ([10.236.134.211]) by 10.236.134.211 with SMTP id s59mr20238384yhi.131.1330940291310 (num_hops = 1); Mon, 05 Mar 2012 01:38:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.134.211 with SMTP id s59mr16012488yhi.131.1330940291265; Mon, 05 Mar 2012 01:38:11 -0800 (PST) Received: by 10.146.241.19 with HTTP; Mon, 5 Mar 2012 01:38:11 -0800 (PST) In-Reply-To: <20120302211454.GB2559@intel.com> References: <20120302211454.GB2559@intel.com> Date: Mon, 5 Mar 2012 10:38:11 +0100 Message-ID: Subject: Re: [PATCH 10/10] addr32: Add *zero_extendsidi2_x32. From: Uros Bizjak To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org, Richard Henderson 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 On Fri, Mar 2, 2012 at 10:14 PM, H.J. Lu wrote: > This is the last patch for Pmode == SImod in x32. In x32, the return value > of the symbol address must be zero-extended to DImode, This patch adds > *zero_extendsidi2_x32 to load the address of a symbol in SImode and > zero-extend it to DImode. It works for x32 since the address size is 32bit. > OK for trunk? Can you please try attached patch instead? It enhances existing insn pattern with required functionality. Uros. Index: i386.md =================================================================== --- i386.md (revision 184917) +++ i386.md (working copy) @@ -3375,10 +3375,10 @@ (define_insn "*zero_extendsidi2_rex64" [(set (match_operand:DI 0 "nonimmediate_operand" - "=r,o,?*Ym,?*y,?*Yi,!*x") + "=r ,o,?*Ym,?*y,?*Yi,!*x") (zero_extend:DI - (match_operand:SI 1 "nonimmediate_operand" - "rm,0,r ,m ,r ,m*x")))] + (match_operand:SI 1 "x86_64_zext_general_operand" + "rmZ,0,r ,m ,r ,m*x")))] "TARGET_64BIT" "@ mov{l}\t{%1, %k0|%k0, %1} Index: predicates.md =================================================================== --- predicates.md (revision 184917) +++ predicates.md (working copy) @@ -341,6 +341,14 @@ (match_operand 0 "general_operand"))) ;; Return true if OP is general operand representable on x86_64 +;; as zero extended constant. +(define_predicate "x86_64_zext_general_operand" + (if_then_else (match_test "TARGET_64BIT") + (ior (match_operand 0 "nonimmediate_operand") + (match_operand 0 "x86_64_zext_immediate_operand")) + (match_operand 0 "general_operand"))) + +;; Return true if OP is general operand representable on x86_64 ;; as either sign extended or zero extended constant. (define_predicate "x86_64_szext_general_operand" (if_then_else (match_test "TARGET_64BIT")