From patchwork Mon Feb 14 15:01:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 83086 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 C18BFB718E for ; Tue, 15 Feb 2011 02:01:57 +1100 (EST) Received: (qmail 29935 invoked by alias); 14 Feb 2011 15:01:53 -0000 Received: (qmail 29921 invoked by uid 22791); 14 Feb 2011 15:01:51 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL, BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 15:01:46 +0000 Received: by qyk36 with SMTP id 36so3701056qyk.20 for ; Mon, 14 Feb 2011 07:01:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.80.146 with SMTP id t18mr3246731qak.69.1297695704326; Mon, 14 Feb 2011 07:01:44 -0800 (PST) Received: by 10.224.20.5 with HTTP; Mon, 14 Feb 2011 07:01:44 -0800 (PST) In-Reply-To: <20110213231729.GA23399@intel.com> References: <20110213231729.GA23399@intel.com> Date: Mon, 14 Feb 2011 07:01:44 -0800 Message-ID: Subject: Re: [x32] PATCH: Properly check __x86_64__ and __LP64__ in i386/morestack.S From: "H.J. Lu" To: GCC Patches 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 On Sun, Feb 13, 2011 at 3:17 PM, H.J. Lu wrote: > Hi, > > I am checking this patch into x32 branch to compile i386/morestack.S > for x32. > > H.J. > --- > From f0440a5aa8fcac7fb1e4630cbbbb743d56365bb5 Mon Sep 17 00:00:00 2001 > From: H.J. Lu > Date: Sun, 13 Feb 2011 14:58:23 -0800 > Subject: [PATCH 2/3] Properly check __x86_64__ and __LP64__ in i386/morestack.S. > > --- >  gcc/ChangeLog.x32              |    5 +++++ >  libgcc/config/i386/morestack.S |    8 ++++---- >  2 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 > index 7aeeba5..dda2a10 100644 > --- a/gcc/ChangeLog.x32 > +++ b/gcc/ChangeLog.x32 > @@ -1,5 +1,10 @@ >  2011-02-13  H.J. Lu   > > +       * config/i386/morestack.S: Properly check __x86_64__ and > +       __LP64__. > + > +2011-02-13  H.J. Lu   > + >        * config.gcc: Support --enable-x32 for x86 Linux targets. > >        * configure.ac: Support --enable-x32. > diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S > index 10fa1fd..44a11ae 100644 > --- a/libgcc/config/i386/morestack.S > +++ b/libgcc/config/i386/morestack.S > @@ -477,7 +477,7 @@ __morestack: >        .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat >        .type   DW.ref.__gcc_personality_v0, @object >  DW.ref.__gcc_personality_v0: > -#ifndef __x86_64 > +#ifndef __LP64___ >        .align 4 >        .size   DW.ref.__gcc_personality_v0, 4 >        .long   __gcc_personality_v0 > @@ -488,7 +488,7 @@ DW.ref.__gcc_personality_v0: >  #endif >  #endif > > -#ifdef __x86_64__ > +#if defined __x86_64__ && defined __LP64__ > >  # This entry point is used for the large model.  With this entry point >  # the upper 32 bits of %r10 hold the argument size and the lower 32 > @@ -521,7 +521,7 @@ __morestack_large_model: >        .size   __morestack_large_model, . - __morestack_large_model >  #endif > > -#endif /* __x86_64__ */ > +#endif /* __x86_64__ && __LP64__ */ > >  # Initialize the stack test value when the program starts or when a >  # new thread starts.  We don't know how large the main stack is, so we > @@ -576,7 +576,7 @@ __stack_split_initialize: > >        .section        .ctors.65535,"aw",@progbits > > -#ifndef __x86_64__ > +#ifndef __LP64___ >        .align  4 >        .long   __stack_split_initialize >        .long   __morestack_load_mmap > -- > 1.7.4 > > I checked in this to fix a typo. H.J. --- commit 23f41a82ff2c1d36d49b6d3c612e861a5af70dde Author: H.J. Lu Date: Mon Feb 14 06:57:20 2011 -0800 Replace __LP64___ with __LP64__. .long __gcc_personality_v0 @@ -576,7 +576,7 @@ __stack_split_initialize: .section .ctors.65535,"aw",@progbits -#ifndef __LP64___ +#ifndef __LP64__ .align 4 .long __stack_split_initialize .long __morestack_load_mmap diff --git a/libgcc/ChangeLog.x32 b/libgcc/ChangeLog.x32 index 27e9264..d980b39 100644 --- a/libgcc/ChangeLog.x32 +++ b/libgcc/ChangeLog.x32 @@ -1,3 +1,7 @@ +2011-02-14 H.J. Lu + + * config/i386/morestack.S: Replace __LP64___ with __LP64__. + 2011-02-13 H.J. Lu * config/i386/morestack.S: Properly check __x86_64__ and diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S index 44a11ae..4496e3d 100644 --- a/libgcc/config/i386/morestack.S +++ b/libgcc/config/i386/morestack.S @@ -477,7 +477,7 @@ __morestack: .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_ personality_v0,comdat .type DW.ref.__gcc_personality_v0, @object DW.ref.__gcc_personality_v0: -#ifndef __LP64___ +#ifndef __LP64__ .align 4 .size DW.ref.__gcc_personality_v0, 4