1 /* Common hooks for IA64.
2 Copyright (C) 1999-2016 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
22 #include "coretypes.h"
23 #include "diagnostic-core.h"
26 #include "common/common-target.h"
27 #include "common/common-target-def.h"
32 /* Implement overriding of the optimization options. */
33 static const struct default_options ia64_option_optimization_table
[] =
35 { OPT_LEVELS_1_PLUS
, OPT_fomit_frame_pointer
, NULL
, 1 },
36 #ifdef SUBTARGET_OPTIMIZATION_OPTIONS
37 SUBTARGET_OPTIMIZATION_OPTIONS
,
39 { OPT_LEVELS_NONE
, 0, NULL
, 0 }
42 /* Implement TARGET_HANDLE_OPTION. */
45 ia64_handle_option (struct gcc_options
*opts ATTRIBUTE_UNUSED
,
46 struct gcc_options
*opts_set ATTRIBUTE_UNUSED
,
47 const struct cl_decoded_option
*decoded
,
50 size_t code
= decoded
->opt_index
;
51 const char *arg
= decoded
->arg
;
52 int value
= decoded
->value
;
57 if (value
!= 14 && value
!= 22 && value
!= 64)
58 error_at (loc
, "bad value %<%s%> for -mtls-size= switch", arg
);
66 /* Implement TARGET_EXCEPT_UNWIND_INFO. */
69 ia64_except_unwind_info (struct gcc_options
*opts
)
71 /* Honor the --enable-sjlj-exceptions configure switch. */
72 #ifdef CONFIG_SJLJ_EXCEPTIONS
73 if (CONFIG_SJLJ_EXCEPTIONS
)
77 /* For simplicity elsewhere in this file, indicate that all unwind
78 info is disabled if we're not emitting unwind tables. */
79 if (!opts
->x_flag_exceptions
&& !opts
->x_flag_unwind_tables
)
85 /* Implement TARGET_OPTION_DEFAULT_PARAMS. */
88 ia64_option_default_params (void)
90 /* Let the scheduler form additional regions. */
91 set_default_param_value (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS
, 2);
93 /* Set the default values for cache-related parameters. */
94 set_default_param_value (PARAM_SIMULTANEOUS_PREFETCHES
, 6);
95 set_default_param_value (PARAM_L1_CACHE_LINE_SIZE
, 32);
97 set_default_param_value (PARAM_SCHED_MEM_TRUE_DEP_COST
, 4);
100 #undef TARGET_OPTION_OPTIMIZATION_TABLE
101 #define TARGET_OPTION_OPTIMIZATION_TABLE ia64_option_optimization_table
102 #undef TARGET_OPTION_DEFAULT_PARAMS
103 #define TARGET_OPTION_DEFAULT_PARAMS ia64_option_default_params
105 #undef TARGET_EXCEPT_UNWIND_INFO
106 #define TARGET_EXCEPT_UNWIND_INFO ia64_except_unwind_info
108 #undef TARGET_DEFAULT_TARGET_FLAGS
109 #define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | TARGET_CPU_DEFAULT)
110 #undef TARGET_HANDLE_OPTION
111 #define TARGET_HANDLE_OPTION ia64_handle_option
113 struct gcc_targetm_common targetm_common
= TARGETM_COMMON_INITIALIZER
;