public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work104)] Revert change
@ 2023-01-04 6:37 Michael Meissner
0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2023-01-04 6:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:93982558e1396fea36ca053ba40dd48a47d6a338
commit 93982558e1396fea36ca053ba40dd48a47d6a338
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Wed Jan 4 01:34:54 2023 -0500
Revert change
Diff:
---
gcc/tree.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/tree.cc b/gcc/tree.cc
index 46a3a742592..78b64ee98b3 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -9474,6 +9474,15 @@ build_common_tree_nodes (bool signed_char)
if (!targetm.floatn_mode (n, extended).exists (&mode))
continue;
int precision = GET_MODE_PRECISION (mode);
+ /* Work around the rs6000 KFmode having precision 113 not
+ 128. */
+ const struct real_format *fmt = REAL_MODE_FORMAT (mode);
+ gcc_assert (fmt->b == 2 && fmt->emin + fmt->emax == 3);
+ int min_precision = fmt->p + ceil_log2 (fmt->emax - fmt->emin);
+ if (!extended)
+ gcc_assert (min_precision == n);
+ if (precision < min_precision)
+ precision = min_precision;
FLOATN_NX_TYPE_NODE (i) = make_node (REAL_TYPE);
TYPE_PRECISION (FLOATN_NX_TYPE_NODE (i)) = precision;
layout_type (FLOATN_NX_TYPE_NODE (i));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-04 6:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 6:37 [gcc(refs/users/meissner/heads/work104)] Revert change Michael Meissner
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).