From patchwork Tue Jan 25 22:09:01 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: 80411 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 1C718B6EF1 for ; Wed, 26 Jan 2011 09:11:16 +1100 (EST) Received: (qmail 31715 invoked by alias); 25 Jan 2011 22:11:15 -0000 Received: (qmail 31624 invoked by uid 22791); 25 Jan 2011 22:11:12 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Jan 2011 22:11:04 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 25 Jan 2011 14:09:02 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by orsmga002.jf.intel.com with ESMTP; 25 Jan 2011 14:09:02 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 97612180299; Tue, 25 Jan 2011 14:09:01 -0800 (PST) Date: Tue, 25 Jan 2011 14:09:01 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: Re: [x32] PATCH: PR target/47446: [x32] .quad instead of .long is used for address Message-ID: <20110125220901.GA19303@intel.com> Reply-To: "H.J. Lu" References: <20110124210853.GA1460@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110124210853.GA1460@intel.com> 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 On Mon, Jan 24, 2011 at 01:08:53PM -0800, H.J. Lu wrote: > Hi, > > I checked this patch into x32 branch. > > H.J. > --- > commit e9a73ee31b8b78d42edf177690054c2cac8ddf33 > Author: H.J. Lu > Date: Mon Jan 24 13:06:15 2011 -0800 > > Check TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD. > > diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 > index fb3e3e0..ebe1d13 100644 > --- a/gcc/ChangeLog.x32 > +++ b/gcc/ChangeLog.x32 > @@ -1,3 +1,10 @@ > +2011-01-24 H.J. Lu > + > + PR target/47446 > + * config/i386/i386.c (ix86_output_addr_vec_elt): Check > + TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD. > + (ix86_output_addr_diff_elt): Likewise. > + > /* We can't use @GOTOFF for text labels on VxWorks; see gotoff_operand. */ > - if (TARGET_64BIT || TARGET_VXWORKS_RTP) > + if (TARGET_LP64 || TARGET_VXWORKS_RTP) > fprintf (file, "%s%s%d-%s%d\n", > directive, LPREFIX, value, LPREFIX, rel); > else if (HAVE_AS_GOTOFF_IN_DATA) This change is wrong. I checked in this patch to revert it. H.J. --- Author: H.J. Lu Date: Tue Jan 25 14:04:06 2011 -0800 Put back the last TARGET_64BIT check in ix86_output_addr_diff_elt. diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index 6612b40..5e805c0 100644 --- a/gcc/ChangeLog.x32 +++ b/gcc/ChangeLog.x32 @@ -1,5 +1,11 @@ 2011-01-25 H.J. Lu + PR target/47446 + * config/i386/i386.c (ix86_output_addr_diff_elt): Put back the + last TARGET_64BIT check. + +2011-01-25 H.J. Lu + PR middle-end/47449 * fwprop.c (forward_propagate_subreg): Don't propagate hard register. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 957fc2a..8e652b8 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15217,7 +15217,7 @@ ix86_output_addr_diff_elt (FILE *file, int value, int rel) gcc_assert (!TARGET_64BIT); #endif /* We can't use @GOTOFF for text labels on VxWorks; see gotoff_operand. */ - if (TARGET_LP64 || TARGET_VXWORKS_RTP) + if (TARGET_64BIT || TARGET_VXWORKS_RTP) fprintf (file, "%s%s%d-%s%d\n", directive, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32 index 271a2ae..597294e 100644 --- a/gcc/testsuite/ChangeLog.x32 +++ b/gcc/testsuite/ChangeLog.x32 @@ -1,3 +1,8 @@ +2011-01-25 H.J. Lu + + PR target/47446 + * gcc.target/i386/pr47446-2.c: New. + 2011-01-24 H.J. Lu PR middle-end/47449 diff --git a/gcc/testsuite/gcc.target/i386/pr47446-2.c b/gcc/testsuite/gcc.target/i386/pr47446-2.c new file mode 100644 index 0000000..5410c7f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr47446-2.c @@ -0,0 +1,41 @@ +/* { dg-do assemble } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-O2 -fpic" } */ + +extern void abort (void); +enum +{ + __GCONV_OK = 0, + __GCONV_NOCONV, + __GCONV_NODB, + __GCONV_NOMEM, + __GCONV_EMPTY_INPUT, + __GCONV_FULL_OUTPUT, + __GCONV_ILLEGAL_INPUT, + __GCONV_INCOMPLETE_INPUT, + __GCONV_ILLEGAL_DESCRIPTOR, + __GCONV_INTERNAL_ERROR +}; +int +foo (int result) +{ + int irreversible = 0; + switch (result) + { + case __GCONV_ILLEGAL_INPUT: + irreversible = -1L; + break; + case __GCONV_FULL_OUTPUT: + irreversible = -2L; + break; + case __GCONV_INCOMPLETE_INPUT: + irreversible = -3L; + break; + case __GCONV_EMPTY_INPUT: + case __GCONV_OK: + break; + default: + abort (); + } + return irreversible; +}