xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/common/config/csky/csky-common.c (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1627f7eb2Smrg /* Common hooks for CSKY.
2*4c3eb207Smrg    Copyright (C) 2018-2020 Free Software Foundation, Inc.
3627f7eb2Smrg    Contributed by C-SKY Microsystems and Mentor Graphics.
4627f7eb2Smrg 
5627f7eb2Smrg    This file is part of GCC.
6627f7eb2Smrg 
7627f7eb2Smrg    GCC is free software; you can redistribute it and/or modify it
8627f7eb2Smrg    under the terms of the GNU General Public License as published
9627f7eb2Smrg    by the Free Software Foundation; either version 3, or (at your
10627f7eb2Smrg    option) any later version.
11627f7eb2Smrg 
12627f7eb2Smrg    GCC is distributed in the hope that it will be useful, but WITHOUT
13627f7eb2Smrg    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14627f7eb2Smrg    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15627f7eb2Smrg    License for more details.
16627f7eb2Smrg 
17627f7eb2Smrg    You should have received a copy of the GNU General Public License
18627f7eb2Smrg    along with GCC; see the file COPYING3.  If not see
19627f7eb2Smrg    <http://www.gnu.org/licenses/>.  */
20627f7eb2Smrg 
21627f7eb2Smrg #include "config.h"
22627f7eb2Smrg #include "system.h"
23627f7eb2Smrg #include "coretypes.h"
24627f7eb2Smrg #include "tm.h"
25627f7eb2Smrg #include "common/common-target.h"
26627f7eb2Smrg #include "common/common-target-def.h"
27627f7eb2Smrg 
28627f7eb2Smrg /* Set default optimization options.  */
29627f7eb2Smrg static const struct default_options csky_option_optimization_table[] =
30627f7eb2Smrg   {
31627f7eb2Smrg     /* Enable section anchors by default at -O1 or higher.  */
32627f7eb2Smrg     { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
33627f7eb2Smrg     { OPT_LEVELS_NONE, 0, NULL, 0 }
34627f7eb2Smrg   };
35627f7eb2Smrg 
36627f7eb2Smrg #undef  TARGET_DEFAULT_TARGET_FLAGS
37627f7eb2Smrg #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
38627f7eb2Smrg 
39627f7eb2Smrg #undef  TARGET_OPTION_OPTIMIZATION_TABLE
40627f7eb2Smrg #define TARGET_OPTION_OPTIMIZATION_TABLE csky_option_optimization_table
41627f7eb2Smrg 
42627f7eb2Smrg struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
43