+Thu Oct 31 18:08:00 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.
+
Thu Oct 31 16:09:44 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.md (negdf2_ifs_rex64): Don't allow GPR operand.
real_format_for_mode[XFmode - QFmode] = &ieee_extended_intel_96_format;
real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format;
+ /* Set the default values for switches whose defualt depends on TARGET_64BIT
+ in case they wasn'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
ix86_tls_dialect_string);
}
- if (profile_flag)
- target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER;
-
/* Keep nonleaf frame pointers. */
if (TARGET_OMIT_LEAF_FRAME_POINTER)
flag_omit_frame_pointer = 1;
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;
- }
- if (profile_flag)
- flag_omit_frame_pointer = 0;
+
+ /* 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. */
the frame pointer by default. Turn it back on now if we've not
got a leaf function. */
if (TARGET_OMIT_LEAF_FRAME_POINTER
- && (!current_function_is_leaf || current_function_profile))
+ && (!current_function_is_leaf))
+ return 1;
+
+ if (current_function_profile)
return 1;
return 0;