public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: nathan@codesourcery.com, gcc-patches@gcc.gnu.org
Subject: Re: __intN patch 3/5: main __int128 -> __intN conversion.
Date: Sat, 04 Oct 2014 18:36:00 -0000	[thread overview]
Message-ID: <201410041836.s94Ia1sZ025028@greed.delorie.com> (raw)
In-Reply-To: <54303821.2090205@redhat.com> (message from Jason Merrill on Sat,	04 Oct 2014 14:10:41 -0400)


> > Otherwise, I don't see what moving the test would accomplish.  If
> > "long" is never 128 bits, it doesn't matter if the int128 test is
> > before or after it, and the other intN are never the same size as
> > standard types,
> 
> I don't see how you can assert that these will never happen.

It's checked specifically in toplev.c - if the backend *does* request
a type that matches a standard size, they won't get it:
 
+static bool
+standard_type_bitsize (int bitsize)
+{
+  /* As a special exception, we always want __int128 enabled if possible.  */
+  if (bitsize == 128)
+    return false;
+  if (bitsize == CHAR_TYPE_SIZE
+      || bitsize == SHORT_TYPE_SIZE
+      || bitsize == INT_TYPE_SIZE
+      || bitsize == LONG_TYPE_SIZE
+      || (bitsize == LONG_LONG_TYPE_SIZE && LONG_LONG_TYPE_SIZE < GET_MODE_BITSIZE (TImode)))
+    return true;
+  return false;
+}

+      /* This must happen after the backend has a chance to process
+	 command line options, but before the parsers are
+	 initialized.  */
+      for (i = 0; i < NUM_INT_N_ENTS; i ++)
+	if (targetm.scalar_mode_supported_p (int_n_data[i].m)
+	    && ! standard_type_bitsize (int_n_data[i].bitsize)
+	    && int_n_data[i].bitsize <= HOST_BITS_PER_WIDE_INT * 2)
+	  int_n_enabled_p[i] = true;
+	else
+	  int_n_enabled_p[i] = false;
+

  reply	other threads:[~2014-10-04 18:36 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 22:11 DJ Delorie
2014-08-13 22:22 ` Oleg Endo
2014-08-13 22:49   ` DJ Delorie
2014-08-21 20:53 ` Joseph S. Myers
2014-08-21 21:23   ` DJ Delorie
2014-08-21 21:38     ` Joseph S. Myers
2014-08-21 22:16       ` DJ Delorie
2014-08-21 22:25         ` Joseph S. Myers
2014-08-22  5:15       ` DJ Delorie
2014-08-22 10:53         ` Joseph S. Myers
2014-08-22 19:24           ` DJ Delorie
2014-08-22 20:16             ` Joseph S. Myers
2014-08-22 20:24               ` DJ Delorie
2014-08-26  3:04               ` DJ Delorie
2014-09-01 21:47                 ` Joseph S. Myers
2014-09-30 23:14                   ` DJ Delorie
2014-10-02  3:22                     ` Jason Merrill
2014-10-02  3:52                       ` DJ Delorie
2014-10-02 14:22                         ` Jason Merrill
2014-10-02 14:48                           ` Jason Merrill
2014-10-02 16:41                           ` DJ Delorie
2014-10-02 17:44                             ` Jason Merrill
2014-10-02 18:00                               ` DJ Delorie
2014-10-03 14:06                                 ` Jason Merrill
2014-10-03 20:11                                   ` DJ Delorie
2014-10-04 18:10                                     ` Jason Merrill
2014-10-04 18:36                                       ` DJ Delorie [this message]
2014-10-08 21:27                                       ` DJ Delorie
2014-10-09 13:49                                         ` Jason Merrill
2014-10-13 20:58                                           ` DJ Delorie
2014-10-14 13:56                                             ` Jason Merrill
2014-10-14 20:17                                               ` DJ Delorie
2014-10-15  8:49                                                 ` Paolo Carlini
2014-10-15 11:43                                                   ` Marc Glisse
2014-10-02 19:14                               ` DJ Delorie
2014-09-23 19:03                 ` Jonathan Wakely
2014-09-29 18:06                   ` DJ Delorie
2014-09-29 18:37                     ` Jonathan Wakely
2014-09-30 19:37                   ` DJ Delorie
2014-09-30 22:54                     ` Jonathan Wakely
2014-10-14 20:18                 ` Markus Trippelsdorf
2014-10-14 21:35                   ` DJ Delorie
2014-10-15  8:18                     ` Markus Trippelsdorf
2014-10-15 21:01                       ` DJ Delorie
2014-10-16  6:25                         ` Markus Trippelsdorf
2014-10-16 15:01                           ` David Edelsohn
2014-10-16 20:52                             ` DJ Delorie
2014-10-16 11:04                 ` Andreas Schwab
2014-10-16 22:39                   ` DJ Delorie
2014-10-20  8:19                     ` Andreas Schwab

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=201410041836.s94Ia1sZ025028@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=nathan@codesourcery.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).