From patchwork Sat Jan 29 22:37:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 80983 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 9A6B9B711C for ; Sun, 30 Jan 2011 09:37:49 +1100 (EST) Received: (qmail 25914 invoked by alias); 29 Jan 2011 22:37:45 -0000 Received: (qmail 25782 invoked by uid 22791); 29 Jan 2011 22:37:43 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 29 Jan 2011 22:37:37 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 29 Jan 2011 14:37:35 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 29 Jan 2011 14:37:35 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 6FBA818093C; Sat, 29 Jan 2011 14:37:35 -0800 (PST) Date: Sat, 29 Jan 2011 14:37:35 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: [x32] PATCH: PR target/47537: [x32] internal compiler error: in copy_to_mode_reg, at explow.c:635 Message-ID: <20110129223735.GA1464@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 I checked this patch into x32 branch. H.J. --- commit 30c15b37df663f4119332519700b0416ae92b973 Author: H.J. Lu Date: Sat Jan 29 14:34:53 2011 -0800 Convert to Pmode if needed in ix86_expand_special_args_builtin. diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index ef65e7b..41bfe18 100644 --- a/gcc/ChangeLog.x32 +++ b/gcc/ChangeLog.x32 @@ -1,3 +1,9 @@ +2011-01-29 H.J. Lu + + PR target/47537 + * config/i386/i386.c (ix86_expand_special_args_builtin): Convert + to Pmode if needed. + 2011-01-27 H.J. Lu PR rtl-optimization/47502 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d53e444..642d49f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -27040,6 +27040,8 @@ ix86_expand_special_args_builtin (const struct builtin_description *d, if (i == memory) { /* This must be the memory operand. */ + if (GET_MODE (op) != Pmode) + op = convert_to_mode (Pmode, op, 1); op = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, op)); gcc_assert (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode);