]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common/config/ia64/ia64-common.c
Fix test-suite fallout.
[thirdparty/gcc.git] / gcc / common / config / ia64 / ia64-common.c
CommitLineData
677f3fa8 1/* Common hooks for IA64.
a5544970 2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
677f3fa8
JM
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#include "config.h"
21#include "system.h"
22#include "coretypes.h"
23#include "diagnostic-core.h"
24#include "tm.h"
4d0cdd0c 25#include "memmodel.h"
677f3fa8
JM
26#include "tm_p.h"
27#include "common/common-target.h"
28#include "common/common-target-def.h"
29#include "opts.h"
30#include "flags.h"
31
32/* Implement overriding of the optimization options. */
33static const struct default_options ia64_option_optimization_table[] =
34 {
677f3fa8
JM
35#ifdef SUBTARGET_OPTIMIZATION_OPTIONS
36 SUBTARGET_OPTIMIZATION_OPTIONS,
37#endif
38 { OPT_LEVELS_NONE, 0, NULL, 0 }
39 };
40
41/* Implement TARGET_HANDLE_OPTION. */
42
43static bool
44ia64_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
45 struct gcc_options *opts_set ATTRIBUTE_UNUSED,
46 const struct cl_decoded_option *decoded,
47 location_t loc)
48{
49 size_t code = decoded->opt_index;
50 const char *arg = decoded->arg;
51 int value = decoded->value;
52
53 switch (code)
54 {
55 case OPT_mtls_size_:
56 if (value != 14 && value != 22 && value != 64)
a3f9f006 57 error_at (loc, "bad value %<%s%> for %<-mtls-size=%> switch", arg);
677f3fa8
JM
58 return true;
59
60 default:
61 return true;
62 }
63}
64
65/* Implement TARGET_EXCEPT_UNWIND_INFO. */
66
67enum unwind_info_type
68ia64_except_unwind_info (struct gcc_options *opts)
69{
70 /* Honor the --enable-sjlj-exceptions configure switch. */
d656c9c5
TG
71#ifdef CONFIG_SJLJ_EXCEPTIONS
72 if (CONFIG_SJLJ_EXCEPTIONS)
677f3fa8
JM
73 return UI_SJLJ;
74#endif
75
76 /* For simplicity elsewhere in this file, indicate that all unwind
77 info is disabled if we're not emitting unwind tables. */
78 if (!opts->x_flag_exceptions && !opts->x_flag_unwind_tables)
79 return UI_NONE;
80
81 return UI_TARGET;
82}
83
4c77620d
JM
84/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
85
86static void
87ia64_option_default_params (void)
88{
89 /* Let the scheduler form additional regions. */
028d4092 90 param_max_sched_extend_regions_iters = 2;
4c77620d
JM
91
92 /* Set the default values for cache-related parameters. */
028d4092
ML
93 param_simultaneous_prefetches = 6;
94 param_l1_cache_line_size = 32;
4c77620d 95
028d4092 96 param_sched_mem_true_dep_cost = 4;
4c77620d
JM
97}
98
677f3fa8
JM
99#undef TARGET_OPTION_OPTIMIZATION_TABLE
100#define TARGET_OPTION_OPTIMIZATION_TABLE ia64_option_optimization_table
4c77620d
JM
101#undef TARGET_OPTION_DEFAULT_PARAMS
102#define TARGET_OPTION_DEFAULT_PARAMS ia64_option_default_params
677f3fa8
JM
103
104#undef TARGET_EXCEPT_UNWIND_INFO
105#define TARGET_EXCEPT_UNWIND_INFO ia64_except_unwind_info
106
107#undef TARGET_DEFAULT_TARGET_FLAGS
108#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | TARGET_CPU_DEFAULT)
109#undef TARGET_HANDLE_OPTION
110#define TARGET_HANDLE_OPTION ia64_handle_option
111
112struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;