public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: DJ Delorie <dj@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [lto] don't assume pointer size
Date: Thu, 16 Oct 2014 08:06:00 -0000	[thread overview]
Message-ID: <CAFiYyc1Lph3T0sLFbgc3V5ogMZALi-yTQkb7mDgZVd7pEeA83A@mail.gmail.com> (raw)
In-Reply-To: <201410152207.s9FM7wE8011989@greed.delorie.com>

On Thu, Oct 16, 2014 at 12:07 AM, DJ Delorie <dj@redhat.com> wrote:
>
> In the event that pointer sizes aren't powers of two, choose a more
> suitable alignment than (unsigned)(-1), which results in HUGE file
> sizes.  Ok?

Ok.

Thanks,
Richard.

> Index: gcc/lto/lto-object.c
> ===================================================================
> --- gcc/lto/lto-object.c        (revision 216287)
> +++ gcc/lto/lto-object.c        (working copy)
> @@ -335,13 +335,13 @@ lto_obj_begin_section (const char *name)
>    lo = (struct lto_simple_object *) current_out_file;
>    gcc_assert (lo != NULL
>               && lo->sobj_r == NULL
>               && lo->sobj_w != NULL
>               && lo->section == NULL);
>
> -  align = exact_log2 (POINTER_SIZE / BITS_PER_UNIT);
> +  align = ceil_log2 (POINTER_SIZE_UNITS);
>    lo->section = simple_object_write_create_section (lo->sobj_w, name, align,
>                                                     &errmsg, &err);
>    if (lo->section == NULL)
>      {
>        if (err == 0)
>         fatal_error ("%s", errmsg);

  reply	other threads:[~2014-10-16  8:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 22:16 DJ Delorie
2014-10-16  8:06 ` Richard Biener [this message]
2014-10-16 21:16   ` DJ Delorie

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=CAFiYyc1Lph3T0sLFbgc3V5ogMZALi-yTQkb7mDgZVd7pEeA83A@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).