From 64a7cc13e8273348796202a1f3b90e8ee98faefa Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 31 Oct 2002 19:39:32 +0100 Subject: [PATCH] i386.c (override_options): Set defaults for flag_omit_frame_pointer... * 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 | 10 ++++++++++ gcc/config/i386/i386.c | 36 +++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2df251ba6926..d05b99b623f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Thu Oct 31 18:31:22 CET 2002 Jan Hubicka + + * 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 * varasm.c (asm_output_aligned_bss): Do not call diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e536cb66c644..c4764065f060 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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; } /* Table of valid machine attributes. */ -- 2.47.2