-/* Change optimizations to be performed, depending on the
- optimization level. */
-
-static const struct default_options s390_option_optimization_table[] =
- {
- { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
-
- /* ??? There are apparently still problems with -fcaller-saves. */
- { OPT_LEVELS_ALL, OPT_fcaller_saves, NULL, 0 },
-
- /* Use MVCLE instructions to decrease code size if requested. */
- { OPT_LEVELS_SIZE, OPT_mmvcle, NULL, 1 },
-
- { OPT_LEVELS_NONE, 0, NULL, 0 }
- };
-
-/* Implement TARGET_OPTION_INIT_STRUCT. */
-
-static void
-s390_option_init_struct (struct gcc_options *opts)
-{
- /* By default, always emit DWARF-2 unwind info. This allows debugging
- without maintaining a stack frame back-chain. */
- opts->x_flag_asynchronous_unwind_tables = 1;
-}
-
-/* Return true if ARG is the name of a processor. Set *TYPE and *FLAGS
- to the associated processor_type and processor_flags if so. */
-
-static bool
-s390_handle_arch_option (const char *arg,
- enum processor_type *type,
- int *flags)
-{
- static struct pta
- {
- const char *const name; /* processor name or nickname. */
- const enum processor_type processor;
- const int flags; /* From enum processor_flags. */
- }
- const processor_alias_table[] =
- {
- {"g5", PROCESSOR_9672_G5, PF_IEEE_FLOAT},
- {"g6", PROCESSOR_9672_G6, PF_IEEE_FLOAT},
- {"z900", PROCESSOR_2064_Z900, PF_IEEE_FLOAT | PF_ZARCH},
- {"z990", PROCESSOR_2084_Z990, PF_IEEE_FLOAT | PF_ZARCH
- | PF_LONG_DISPLACEMENT},
- {"z9-109", PROCESSOR_2094_Z9_109, PF_IEEE_FLOAT | PF_ZARCH
- | PF_LONG_DISPLACEMENT | PF_EXTIMM},
- {"z9-ec", PROCESSOR_2094_Z9_109, PF_IEEE_FLOAT | PF_ZARCH
- | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP },
- {"z10", PROCESSOR_2097_Z10, PF_IEEE_FLOAT | PF_ZARCH
- | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP | PF_Z10},
- {"z196", PROCESSOR_2817_Z196, PF_IEEE_FLOAT | PF_ZARCH
- | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP | PF_Z10 | PF_Z196 },
- };
- size_t i;
-
- for (i = 0; i < ARRAY_SIZE (processor_alias_table); i++)
- if (strcmp (arg, processor_alias_table[i].name) == 0)
- {
- *type = processor_alias_table[i].processor;
- *flags = processor_alias_table[i].flags;
- return true;
- }
-
- *type = PROCESSOR_max;
- *flags = 0;
- return false;
-}
-
-/* Implement TARGET_HANDLE_OPTION. */
-
-static bool
-s390_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
-{
- switch (code)
- {
- case OPT_march_:
- return s390_handle_arch_option (arg, &s390_arch, &s390_arch_flags);
-
- case OPT_mstack_guard_:
- if (sscanf (arg, HOST_WIDE_INT_PRINT_DEC, &s390_stack_guard) != 1)
- return false;
- if (exact_log2 (s390_stack_guard) == -1)
- error ("stack guard value must be an exact power of 2");
- return true;
-
- case OPT_mstack_size_:
- if (sscanf (arg, HOST_WIDE_INT_PRINT_DEC, &s390_stack_size) != 1)
- return false;
- if (exact_log2 (s390_stack_size) == -1)
- error ("stack size must be an exact power of 2");
- return true;
-
- case OPT_mtune_:
- return s390_handle_arch_option (arg, &s390_tune, &s390_tune_flags);
-
- case OPT_mwarn_framesize_:
- return sscanf (arg, HOST_WIDE_INT_PRINT_DEC, &s390_warn_framesize) == 1;
-
- default:
- return true;
- }
-}
-