public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work058)] Move section anchors up higher.
@ 2021-07-07 15:05 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2021-07-07 15:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ac4134659e40033794ff547b8e261cc4910c0bfc

commit ac4134659e40033794ff547b8e261cc4910c0bfc
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Wed Jul 7 11:03:00 2021 -0400

    Move section anchors up higher.
    
    2021-07-07  Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
            * gcc/config/rs6000/rs6000.c (rs6000_option_override_internal):
            Move -mconst-anchor and -msection-anchors-offset higher.

Diff:
---
 gcc/config/rs6000/rs6000.c | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 7677741d50b..c91b276cae5 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4426,6 +4426,26 @@ rs6000_option_override_internal (bool global_init_p)
 	}
     }
 
+  /* Possibly set the const_anchor and min/max anchor values to the maximum
+     value, based on whether we have prefixed addressing.  Note both of these
+     options need -fsection-anchors enabled.  */
+  if (TARGET_SECTION_ANCHOR_OFFSET || TARGET_CONST_ANCHOR)
+    {
+      HOST_WIDE_INT shift_amount = TARGET_PREFIXED ? 33 : 15;
+      HOST_WIDE_INT max_bits_plus_1 = HOST_WIDE_INT_1 << shift_amount;
+
+      if (TARGET_CONST_ANCHOR)
+	targetm.const_anchor = max_bits_plus_1;
+
+      if (TARGET_SECTION_ANCHOR_OFFSET)
+	{
+	  targetm.min_anchor_offset = -max_bits_plus_1;
+	  targetm.max_anchor_offset = max_bits_plus_1 - 1;
+	}
+
+      flag_section_anchors = true;
+    }
+
   /* Place FP constants in the constant pool instead of TOC
      if section anchors enabled.  */
   if (flag_section_anchors
@@ -4545,27 +4565,6 @@ rs6000_option_override_internal (bool global_init_p)
 	error ("%qs requires %qs", "-mlxvkq", "-mfloat128-hardware");
     }
 
-  /* Possibly set the const_anchor and min/max anchor values to the maximum
-     value, based on whether we have prefixed addressing.  Note both of these
-     options need -fsection-anchors enabled.  */
-  if (TARGET_SECTION_ANCHOR_OFFSET || TARGET_CONST_ANCHOR)
-    {
-      HOST_WIDE_INT shift_amount = TARGET_PREFIXED ? 33 : 15;
-      HOST_WIDE_INT max_bits_plus_1 = HOST_WIDE_INT_1 << shift_amount;
-
-      if (TARGET_CONST_ANCHOR)
-	targetm.const_anchor = max_bits_plus_1;
-
-      if (TARGET_SECTION_ANCHOR_OFFSET)
-	{
-	  targetm.min_anchor_offset = -max_bits_plus_1;
-	  targetm.max_anchor_offset = max_bits_plus_1 - 1;
-	}
-
-      if (!global_options_set.x_flag_section_anchors)
-	flag_section_anchors = true;
-    }
-
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
     rs6000_print_isa_options (stderr, 0, "after subtarget", rs6000_isa_flags);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-07 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 15:05 [gcc(refs/users/meissner/heads/work058)] Move section anchors up higher 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).