diff options
Diffstat (limited to 'gcc/config/pa/pa.c')
-rw-r--r-- | gcc/config/pa/pa.c | 64 |
1 files changed, 7 insertions, 57 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e512a33..b358fc3 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "predict.h" #include "tm_p.h" #include "target.h" +#include "common/common-target.h" #include "target-def.h" #include "langhooks.h" #include "df.h" @@ -88,8 +89,6 @@ hppa_fpstore_bypass_p (rtx out_insn, rtx in_insn) static void pa_option_override (void); static void copy_reg_pointer (rtx, rtx); static void fix_range (const char *); -static bool pa_handle_option (struct gcc_options *, struct gcc_options *, - const struct cl_decoded_option *, location_t); static int hppa_register_move_cost (enum machine_mode mode, reg_class_t, reg_class_t); static int hppa_address_cost (rtx, bool); @@ -224,21 +223,11 @@ struct GTY(()) deferred_plabel static GTY((length ("n_deferred_plabels"))) struct deferred_plabel * deferred_plabels; static size_t n_deferred_plabels = 0; - -/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */ -static const struct default_options pa_option_optimization_table[] = - { - { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, - { OPT_LEVELS_NONE, 0, NULL, 0 } - }; - /* Initialize the GCC target structure. */ #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE pa_option_override -#undef TARGET_OPTION_OPTIMIZATION_TABLE -#define TARGET_OPTION_OPTIMIZATION_TABLE pa_option_optimization_table #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.half\t" @@ -310,11 +299,6 @@ static const struct default_options pa_option_optimization_table[] = #define TARGET_ASM_DESTRUCTOR pa_asm_out_destructor #endif -#undef TARGET_DEFAULT_TARGET_FLAGS -#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | TARGET_CPU_DEFAULT) -#undef TARGET_HANDLE_OPTION -#define TARGET_HANDLE_OPTION pa_handle_option - #undef TARGET_INIT_BUILTINS #define TARGET_INIT_BUILTINS pa_init_builtins @@ -476,41 +460,6 @@ fix_range (const char *const_str) target_flags |= MASK_DISABLE_FPREGS; } -/* Implement TARGET_HANDLE_OPTION. */ - -static bool -pa_handle_option (struct gcc_options *opts, - struct gcc_options *opts_set ATTRIBUTE_UNUSED, - const struct cl_decoded_option *decoded, - location_t loc ATTRIBUTE_UNUSED) -{ - size_t code = decoded->opt_index; - - switch (code) - { - case OPT_mnosnake: - case OPT_mpa_risc_1_0: - case OPT_march_1_0: - opts->x_target_flags &= ~(MASK_PA_11 | MASK_PA_20); - return true; - - case OPT_msnake: - case OPT_mpa_risc_1_1: - case OPT_march_1_1: - opts->x_target_flags &= ~MASK_PA_20; - opts->x_target_flags |= MASK_PA_11; - return true; - - case OPT_mpa_risc_2_0: - case OPT_march_2_0: - opts->x_target_flags |= MASK_PA_11 | MASK_PA_20; - return true; - - default: - return true; - } -} - /* Implement the TARGET_OPTION_OVERRIDE hook. */ static void @@ -538,7 +487,7 @@ pa_option_override (void) call frame information. There is no benefit in using this optimization on PA8000 and later processors. */ if (pa_cpu >= PROCESSOR_8000 - || (targetm.except_unwind_info (&global_options) == UI_DWARF2 + || (targetm_common.except_unwind_info (&global_options) == UI_DWARF2 && flag_exceptions) || flag_unwind_tables) target_flags &= ~MASK_JUMP_IN_DELAY; @@ -8205,7 +8154,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, && !(flag_pic && TREE_PUBLIC (function)) && (TARGET_GAS || last_address < 262132)) || (!TARGET_LONG_CALLS && !TARGET_SOM && !TARGET_PORTABLE_RUNTIME - && ((targetm.have_named_sections + && ((targetm_common.have_named_sections && DECL_SECTION_NAME (thunk_fndecl) != NULL /* The GNU 64-bit linker has rather poor stub management. So, we use a long branch from thunks that aren't in @@ -8216,11 +8165,12 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, || ((DECL_SECTION_NAME (thunk_fndecl) == DECL_SECTION_NAME (function)) && last_address < 262132))) - || (targetm.have_named_sections + || (targetm_common.have_named_sections && DECL_SECTION_NAME (thunk_fndecl) == NULL && DECL_SECTION_NAME (function) == NULL && last_address < 262132) - || (!targetm.have_named_sections && last_address < 262132)))) + || (!targetm_common.have_named_sections + && last_address < 262132)))) { if (!val_14) output_asm_insn ("addil L'%2,%%r26", xoperands); @@ -10264,7 +10214,7 @@ pa_function_section (tree decl, enum node_frequency freq, bool startup, bool exit) { /* Put functions in text section if target doesn't have named sections. */ - if (!targetm.have_named_sections) + if (!targetm_common.have_named_sections) return text_section; /* Force nested functions into the same section as the containing |