]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (override_options): Set defaults for flag_omit_frame_pointer...
authorJan Hubicka <jh@suse.cz>
Thu, 31 Oct 2002 18:39:32 +0000 (19:39 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 31 Oct 2002 18:39:32 +0000 (18:39 +0000)
* i386.c (override_options): Set defaults for flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return.
* i386.c (optimization_options): Set flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2.
Do not clear -momit-leaf-frame-pointer when profiling.
(ix86_frame_pointer_required): Frame pointer is allways required when
profiling.

From-SVN: r58685

gcc/ChangeLog
gcc/config/i386/i386.c

index 2df251ba6926cdcf1140ab43703320f1d74e42f2..d05b99b623f344c3089dc629617a66c1a65304c0 100644 (file)
@@ -1,3 +1,13 @@
+Thu Oct 31 18:31:22 CET 2002  Jan Hubicka  <jh@suse.cz>
+
+       * i386.c (override_options): Set defaults for flag_omit_frame_pointer,
+       flag_asynchronous_unwind_tables, flag_pcc_struct_return.
+       * i386.c (optimization_options): Set flag_omit_frame_pointer,
+       flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2.
+       Do not clear -momit-leaf-frame-pointer when profiling.
+       (ix86_frame_pointer_required): Frame pointer is allways required when
+       profiling.
+
 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
 
        * varasm.c (asm_output_aligned_bss): Do not call
index e536cb66c644f3928d1c9d1600b3c079f2335d68..c4764065f060ca543cc4bbb2edd0b20a95defa1d 100644 (file)
@@ -906,6 +906,27 @@ override_options ()
 
   int const pta_size = sizeof (processor_alias_table) / sizeof (struct pta);
 
+  /* Set the default values for switches whose default depends on TARGET_64BIT
+     in case they weren't overwriten by command line options.  */
+  if (TARGET_64BIT)
+    {
+      if (flag_omit_frame_pointer == 2)
+       flag_omit_frame_pointer = 1;
+      if (flag_asynchronous_unwind_tables == 2)
+       flag_asynchronous_unwind_tables = 1;
+      if (flag_pcc_struct_return == 2)
+       flag_pcc_struct_return = 0;
+    }
+  else
+    {
+      if (flag_omit_frame_pointer == 2)
+       flag_omit_frame_pointer = 0;
+      if (flag_asynchronous_unwind_tables == 2)
+       flag_asynchronous_unwind_tables = 0;
+      if (flag_pcc_struct_return == 2)
+       flag_pcc_struct_return = 1;
+    }
+
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
 #endif
@@ -1213,13 +1234,14 @@ optimization_options (level, size)
   if (level > 1)
     flag_schedule_insns = 0;
 #endif
-  if (TARGET_64BIT && optimize >= 1)
-    flag_omit_frame_pointer = 1;
-  if (TARGET_64BIT)
-    {
-      flag_pcc_struct_return = 0;
-      flag_asynchronous_unwind_tables = 1;
-    }
+  /* The default values of these switches depend on the TARGET_64BIT
+     that is not known at this moment.  Mark these values with 2 and
+     let user the to override these.  In case there is no command line option
+     specifying them, we will set the defaults in override_options.  */
+  if (optimize >= 1)
+    flag_omit_frame_pointer = 2;
+  flag_pcc_struct_return = 2;
+  flag_asynchronous_unwind_tables = 2;
 }
 \f
 /* Table of valid machine attributes.  */