From: Eric Botcazou <ebotcazou@adacore.com>
To: DJ Delorie <dj@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch 1/4] change specific int128 -> generic intN
Date: Fri, 27 Jun 2014 11:22:00 -0000 [thread overview]
Message-ID: <2471914.BhTlkUd4df@polaris> (raw)
In-Reply-To: <201406242332.s5ONWOZn012836@greed.delorie.com>
> gcc/
> * cppbuiltin.c (define_builtin_macros_for_type_sizes): Round
> pointer size up to a power of two.
> * defaults.h (DWARF2_ADDR_SIZE): Round up.
> (POINTER_SIZE_UNITS): New, rounded up value.
> * dwarf2asm.c (size_of_encoded_value): Use it.
> (dw2_output_indirect_constant_1): Likewise.
> * expmed.c (init_expmed_one_conv): We now know the sizes of
> partial int modes.
> * loop-iv.c (iv_number_of_iterations): Use precision, not size.
> * optabs.c (expand_float): Use precision, not size.
> (expand_fix): Likewise.
> * simplify-rtx (simplify_unary_operation_1): Likewise.
> * tree-dfa.c (get_ref_base_and_extent): Likewise.
> * varasm.c (assemble_addr_to_section): Round up pointer sizes.
> (default_assemble_integer) Likewise.
> (dump_tm_clone_pairs): Likewise.
> * tree-core.c: Adjust comment.
No stor-layout.c listed here but...
> Index: gcc/stor-layout.c
> ===================================================================
> --- gcc/stor-layout.c (revision 211858)
> +++ gcc/stor-layout.c (working copy)
> @@ -2123,13 +2142,13 @@ layout_type (tree type)
>
> case BOOLEAN_TYPE:
> case INTEGER_TYPE:
> case ENUMERAL_TYPE:
> SET_TYPE_MODE (type,
> smallest_mode_for_size (TYPE_PRECISION (type), MODE_INT));
> - TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
> + TYPE_SIZE (type) = bitsize_int (GET_MODE_PRECISION (TYPE_MODE
> (type))); TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE
> (type))); break;
This doesn't look correct, you might end up with types smaller than their
modes and breaking the TYPE_SIZE/TYPE_SIZE_UNIT relationship.
> @@ -2516,16 +2535,33 @@ initialize_sizetypes (void)
> precision = LONG_TYPE_SIZE;
> else if (strcmp (SIZETYPE, "long long unsigned int") == 0)
> precision = LONG_LONG_TYPE_SIZE;
> else if (strcmp (SIZETYPE, "short unsigned int") == 0)
> precision = SHORT_TYPE_SIZE;
> else
> gcc_unreachable ();
>
> bprecision
> - = MIN (precision + BITS_PER_UNIT_LOG + 1, MAX_FIXED_MODE_SIZE);
> + = MIN (precision, MAX_FIXED_MODE_SIZE);
> bprecision
> = GET_MODE_PRECISION (smallest_mode_for_size (bprecision, MODE_INT));
> if (bprecision > HOST_BITS_PER_DOUBLE_INT)
> bprecision = HOST_BITS_PER_DOUBLE_INT;
>
> /* Create stubs for sizetype and bitsizetype so we can create constants.
Why are you reducing the precision here?
--
Eric Botcazou
next prev parent reply other threads:[~2014-06-27 11:22 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 23:03 [patch] " DJ Delorie
2014-04-15 5:54 ` Marc Glisse
2014-04-15 6:17 ` DJ Delorie
2014-04-17 20:17 ` Marc Glisse
2014-05-08 23:34 ` DJ Delorie
2014-05-09 0:26 ` Marc Glisse
2014-05-09 2:21 ` DJ Delorie
2014-05-09 7:59 ` Marc Glisse
2014-05-09 18:29 ` DJ Delorie
2014-06-21 16:24 ` DJ Delorie
2014-06-21 17:35 ` Marc Glisse
2014-06-24 5:40 ` DJ Delorie
2014-06-28 10:09 ` Marc Glisse
2014-06-21 20:17 ` Joseph S. Myers
2014-06-24 5:51 ` DJ Delorie
2014-06-24 23:32 ` [patch 1/4] " DJ Delorie
2014-06-27 11:22 ` Eric Botcazou [this message]
2014-06-27 21:04 ` DJ Delorie
2014-06-27 21:38 ` Joseph S. Myers
2014-06-27 21:50 ` DJ Delorie
2014-06-27 21:57 ` Joseph S. Myers
2014-06-27 23:31 ` DJ Delorie
2014-07-01 2:23 ` DJ Delorie
2014-07-02 8:18 ` Eric Botcazou
2014-07-02 14:57 ` DJ Delorie
2014-07-03 15:53 ` Eric Botcazou
2014-07-03 16:12 ` DJ Delorie
2014-07-03 16:30 ` Bernd Schmidt
2014-07-03 20:01 ` DJ Delorie
2014-07-04 9:50 ` Eric Botcazou
2014-07-04 9:45 ` Eric Botcazou
2014-07-07 6:01 ` DJ Delorie
2014-07-10 8:32 ` Eric Botcazou
2014-07-10 16:35 ` DJ Delorie
2014-07-11 9:06 ` Eric Botcazou
2014-07-11 16:31 ` DJ Delorie
2014-07-12 9:15 ` Eric Botcazou
2014-06-24 23:38 ` [patch 2/4] " DJ Delorie
2014-06-24 23:39 ` [patch 3/4] " DJ Delorie
2014-06-24 23:42 ` [patch 4/4] " 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=2471914.BhTlkUd4df@polaris \
--to=ebotcazou@adacore.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).