From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>, Jakub Jelinek <jakub@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: PATCH: Define TRY_EMPTY_VM_SPACE for Linux/x32
Date: Thu, 05 Apr 2012 15:58:00 -0000 [thread overview]
Message-ID: <CAMe9rOqU0pCXBSqTgNOTURADBGQ=7aFdX54t3yWnnM=fv58_Dw@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4YKjps2ogARrUGJ9=Lg+Y2Tcv+7FzSUazi3JytXCOfMYg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
On Thu, Apr 5, 2012 at 8:36 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Apr 5, 2012 at 3:28 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>>>> Looking at how other targets implement this check, I don't think that
>>>>> this is a problem at all. This issue only shows on a non-bootstrapped
>>>>> build. A full bootstrap will use correct address.
>>>>
>>>> The other place where it shows up is cross compilers but who is going
>>>> to use a 3.2 compiler with GCC 4.8 anyways?
>>>>
>>>
>>> FWIW, I have no problem with checking __LP64__ only. I just want to
>>> mention this potential issue.
>>>
>>
>> Here is a different patch. It checks sizeof (void *) for those hosts
>> where it is appropriate. Does it look OK?
>
> Looks OK to me, but you need a GWP reviewer to OK this change now...
>
Here is the patch with ChangeLog. Tested on Linux/x32. Jakub,
is this OK for trunk?
Thanks.
--
H.J.
[-- Attachment #2: gcc-x32-pch-2.patch --]
[-- Type: text/x-patch, Size: 1265 bytes --]
2012-04-03 H.J. Lu <hongjiu.lu@intel.com>
* config/host-linux.c (TRY_EMPTY_VM_SPACE): Check pointer size
for alpha, arm, i386 and x86-64.
diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c
index 94b7a0b..93c513e 100644
--- a/gcc/config/host-linux.c
+++ b/gcc/config/host-linux.c
@@ -64,14 +64,12 @@
/* For various ports, try to guess a fixed spot in the vm space
that's probably free. */
-#if defined(__alpha)
-# define TRY_EMPTY_VM_SPACE 0x10000000000
+#if defined(__alpha) || defined(__ARM_EABI__) || defined(__i386) \
+ || defined(__x86_64)
+# define TRY_EMPTY_VM_SPACE \
+ (sizeof (void *) == 8 ? 0x1000000000 : 0x60000000)
#elif defined(__ia64)
# define TRY_EMPTY_VM_SPACE 0x2000000100000000
-#elif defined(__x86_64)
-# define TRY_EMPTY_VM_SPACE 0x1000000000
-#elif defined(__i386)
-# define TRY_EMPTY_VM_SPACE 0x60000000
#elif defined(__powerpc__)
# define TRY_EMPTY_VM_SPACE 0x60000000
#elif defined(__s390x__)
@@ -84,8 +82,6 @@
# define TRY_EMPTY_VM_SPACE 0x60000000
#elif defined(__mc68000__)
# define TRY_EMPTY_VM_SPACE 0x40000000
-#elif defined(__ARM_EABI__)
-# define TRY_EMPTY_VM_SPACE 0x60000000
#elif defined(__mips__) && defined(__LP64__)
# define TRY_EMPTY_VM_SPACE 0x8000000000
#elif defined(__mips__)
next prev parent reply other threads:[~2012-04-05 15:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 18:08 Uros Bizjak
2012-04-04 18:47 ` H.J. Lu
2012-04-04 18:51 ` Uros Bizjak
2012-04-04 18:53 ` Andrew Pinski
2012-04-04 18:57 ` H.J. Lu
2012-04-05 13:28 ` H.J. Lu
2012-04-05 15:36 ` Uros Bizjak
2012-04-05 15:58 ` H.J. Lu [this message]
2012-04-10 14:41 ` H.J. Lu
2012-04-11 19:40 ` H.J. Lu
-- strict thread matches above, loose matches on Subject: below --
2012-04-04 1:05 H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOqU0pCXBSqTgNOTURADBGQ=7aFdX54t3yWnnM=fv58_Dw@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=pinskia@gmail.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).