This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Enable section anchors for PowerPC


	Now that section anchors reliably works on all PowerPC targets, I
am considering enabling the functionality by default.  The appended patch
enables section anchors by default except for Objective C and Objective
C++ (due to the languages emitting multiple DECLs).

	Any comments / objections?

Bootstrapped on powerpc-ibm-aix5.2.0.0 and powerpc64-linux.

David


	* config/rs6000/rs6000.c (rs6000_override_options): Enable
	TARGET_NO_FP_IN_TOC for section anchors.
	(optimization_options): Enable section anchors for all
	non-"Objective" languages.

Index: rs6000.c
===================================================================
*** rs6000.c	(revision 113239)
--- rs6000.c	(working copy)
*************** rs6000_override_options (const char *def
*** 1350,1355 ****
--- 1350,1360 ----
        rs6000_alignment_flags = MASK_ALIGN_NATURAL;
      }
  
+   /* Place FP constants in the constant pool instead of TOC
+      if section anchors enabled.  */
+   if (flag_section_anchors)
+     TARGET_NO_FP_IN_TOC = 1;
+ 
    /* Handle -mtls-size option.  */
    rs6000_parse_tls_size_option ();
  
*************** optimization_options (int level ATTRIBUT
*** 1621,1626 ****
--- 1626,1637 ----
  
    /* Double growth factor to counter reduced min jump length.  */
    set_param_value ("max-grow-copy-bb-insns", 16);
+ 
+   /* Enable section anchors by default.
+      Skip section anchors for Objective C and Objective C++
+      until front-ends fixed.  */
+   if (lang_hooks.name[4] != 'O')
+     flag_section_anchors = 1;
  }
  
  /* Implement TARGET_HANDLE_OPTION.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]