public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>,
	gcc-patches@gcc.gnu.org,        dje.gcc@gmail.com
Subject: Re: [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #08
Date: Fri, 23 Oct 2015 17:47:00 -0000	[thread overview]
Message-ID: <20151023174539.GI18348@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <20151023172210.GA18348@ibm-tiger.the-meissners.org>

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

This patch adds support for using 'q' or 'Q' as a suffix for __float128
constants, which is compatible with the existing x86_64 implmenetation of their
__float128 support.

I have built the compiler with this patch and the previous subpatches (1-7).  I
have bootstrapped the compiler with all 16 subpatches installed, and there were
no regressions.  Is it ok to install in the trunk?

2015-10-22  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (TARGET_C_MODE_FOR_SUFFIX): Define 'q'
	and 'Q' as the suffix to use for IEEE 128-bit floating point
	constants with -mfloat128.
	(rs6000_c_mode_for_suffix): Likewise.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

[-- Attachment #2: ieee128-patch07j --]
[-- Type: text/plain, Size: 1394 bytes --]

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 229192)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -1674,6 +1674,9 @@ static const struct attribute_spec rs600
 
 #undef TARGET_OFFLOAD_OPTIONS
 #define TARGET_OFFLOAD_OPTIONS rs6000_offload_options
+
+#undef TARGET_C_MODE_FOR_SUFFIX
+#define TARGET_C_MODE_FOR_SUFFIX rs6000_c_mode_for_suffix
 \f
 
 /* Processor table.  */
@@ -33308,6 +33311,26 @@ rs6000_vector_mode_supported_p (machine_
     return false;
 }
 
+/* Target hook for c_mode_for_suffix.  */
+static machine_mode
+rs6000_c_mode_for_suffix (char suffix)
+{
+  if (TARGET_FLOAT128)
+    {
+      if (suffix == 'q' || suffix == 'Q')
+	return (FLOAT128_IEEE_P (TFmode)) ? TFmode : KFmode;
+
+      /* At the moment, we are not defining a suffix for IBM extended double.
+	 If/when the default for -mabi=ieeelongdouble is changed, and we want
+	 to support __ibm128 constants in legacy library code, we may need to
+	 re-evalaute this decision.  Currently, c-lex.c only supports 'w' and
+	 'q' as machine dependent suffixes.  The x86_64 port uses 'w' for
+	 __float80 constants.  */
+    }
+
+  return VOIDmode;
+}
+
 /* Target hook for invalid_arg_for_unprototyped_fn. */
 static const char *
 invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const_tree val)

  parent reply	other threads:[~2015-10-23 17:45 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 20:14 [PATCH], PowerPC IEEE 128-bit patch #4 Michael Meissner
2015-07-29 22:38 ` Segher Boessenkool
2015-07-29 22:48   ` Michael Meissner
2015-07-29 22:56     ` Segher Boessenkool
2015-07-29 23:48       ` Michael Meissner
2015-07-30 19:57 ` [PATCH], PowerPC IEEE 128-bit patch #4c (revised) Michael Meissner
2015-08-01 19:48   ` David Edelsohn
2015-07-31  2:49 ` [PATCH], PowerPC IEEE 128-bit patch #4 Joseph Myers
2015-08-03 19:02   ` Michael Meissner
2015-08-03 21:18     ` Joseph Myers
2015-08-14 15:47 ` [PATCH], PowerPC IEEE 128-bit patch #5 Michael Meissner
2015-08-19 12:47   ` Segher Boessenkool
2015-08-25 23:33     ` Michael Meissner
2015-08-26 13:16       ` David Edelsohn
2015-08-14 15:49 ` [PATCH], PowerPC IEEE 128-bit patch #6 Michael Meissner
2015-08-26 13:57   ` David Edelsohn
2015-08-14 15:56 ` [PATCH], PowerPC IEEE 128-bit patch #7 Michael Meissner
2015-08-14 16:24   ` Michael Meissner
2015-10-23 17:24   ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2) Michael Meissner
2015-10-23 17:30     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #01 Michael Meissner
2015-10-29 14:28       ` David Edelsohn
2015-10-23 17:31     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #02 Michael Meissner
2015-10-29 14:29       ` David Edelsohn
2015-10-23 17:35     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #03 Michael Meissner
2015-10-29 14:29       ` David Edelsohn
2015-10-23 17:38     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #04 Michael Meissner
2015-10-23 20:24       ` Michael Meissner
2015-10-29 14:29       ` David Edelsohn
2015-10-23 17:39     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #05 Michael Meissner
2015-10-23 18:08       ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #05 (patch included) Michael Meissner
2015-10-29 14:33       ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #05 David Edelsohn
2015-10-23 17:44     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #06 Michael Meissner
2015-10-29 14:36       ` David Edelsohn
2015-10-29 17:56         ` Michael Meissner
2015-10-23 17:45     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #07 Michael Meissner
2015-10-29 14:36       ` David Edelsohn
2015-10-23 17:47     ` Michael Meissner [this message]
2015-10-29 14:38       ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #08 David Edelsohn
2015-10-23 17:47     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #09 Michael Meissner
2015-10-23 20:17       ` Joseph Myers
2015-10-23 20:23         ` Michael Meissner
2015-10-29 14:39       ` David Edelsohn
2015-10-23 17:52     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #10 Michael Meissner
2015-10-29 14:40       ` David Edelsohn
2015-10-23 17:57     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #11 Michael Meissner
2015-10-29 14:42       ` David Edelsohn
2015-10-23 17:58     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #12 Michael Meissner
2015-10-29 14:44       ` David Edelsohn
2015-10-23 18:00     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #13 Michael Meissner
2015-10-29 14:46       ` David Edelsohn
2015-10-23 18:01     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #14 Michael Meissner
2015-10-29 14:46       ` David Edelsohn
2015-10-23 18:03     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #15 Michael Meissner
2015-10-29 14:50       ` David Edelsohn
2015-10-23 18:04     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #16 Michael Meissner
2015-10-29 15:02       ` David Edelsohn
2015-10-23 20:06     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2) Segher Boessenkool
2015-10-23 20:25       ` Michael Meissner
2015-10-27 19:48     ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised #2), Subpatch #17 Michael Meissner
2015-11-04 15:47       ` David Edelsohn
2015-10-27 22:27     ` [PATCH], PowerPC IEEE 128-bit patch #8 (libgcc bits) Michael Meissner
2015-10-27 23:39       ` Joseph Myers
2015-11-03 22:17         ` Michael Meissner
2015-11-03 22:53           ` Michael Meissner
2015-11-14  0:02             ` [PATCH], PowerPC IEEE 128-bit patch #8 (libgcc bits, revised) Michael Meissner
2015-11-16 23:06               ` Joseph Myers
2015-11-03 22:55           ` [PATCH], PowerPC IEEE 128-bit patch #8 (libgcc bits) Mike Stump
2015-11-03 23:41           ` Joseph Myers
2015-10-27 22:35     ` [PATCH], PowerPC IEEE 128-bit patch #9 (enable __float128 by default on VSX systems) Michael Meissner
2015-10-29 14:08       ` Segher Boessenkool
2015-10-29 19:02         ` Joseph Myers
2015-10-29 21:09         ` Michael Meissner
2015-09-16 22:50 ` [PATCH], PowerPC IEEE 128-bit patch #7 (revised) Michael Meissner
2015-09-22  0:19   ` Michael Meissner
2015-10-08 19:04   ` [Patch] PowerPC IEEE 128-bit patch #7 (revised #2) Michael Meissner
2015-10-08 21:30     ` Joseph Myers
2015-10-13 18:11       ` Michael Meissner
2015-10-13 23:44         ` Joseph Myers

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=20151023174539.GI18348@ibm-tiger.the-meissners.org \
    --to=meissner@linux.vnet.ibm.com \
    --cc=dje.gcc@gmail.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).