Implement SLP of internal functions
[official-gcc.git] / gcc / common / config / rx / rx-common.c
blob5787b8fbd1bbeedb05eb6fbf55b77644b72bbf3f
1 /* Common hooks for Renesas RX.
2 Copyright (C) 2008-2018 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)
9 any later version.
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/>. */
20 #include "config.h"
21 #include "system.h"
22 #include "coretypes.h"
23 #include "diagnostic-core.h"
24 #include "tm.h"
25 #include "common/common-target.h"
26 #include "common/common-target-def.h"
27 #include "opts.h"
28 #include "flags.h"
30 /* Extra processing for target specific command line options. */
32 static bool
33 rx_handle_option (struct gcc_options *opts,
34 struct gcc_options *opts_set ATTRIBUTE_UNUSED,
35 const struct cl_decoded_option *decoded,
36 location_t loc)
38 size_t code = decoded->opt_index;
39 int value = decoded->value;
41 switch (code)
43 case OPT_mint_register_:
44 /* Make sure that the -mint-register option is in range. Other
45 handling in rx_option_override. */
46 return value >= 0 && value <= 4;
47 break;
49 case OPT_mmax_constant_size_:
50 /* Make sure that the -mmax-constant_size option is in range. */
51 return value >= 0 && value <= 4;
53 case OPT_mcpu_:
54 if ((enum rx_cpu_types) value == RX200 ||
55 (enum rx_cpu_types) value == RX100)
56 opts->x_target_flags |= MASK_NO_USE_FPU;
57 break;
59 case OPT_fpu:
60 if (opts->x_rx_cpu_type == RX200)
61 error_at (loc, "the RX200 cpu does not have FPU hardware");
62 else if (opts->x_rx_cpu_type == RX100)
63 error_at (loc, "the RX100 cpu does not have FPU hardware");
64 break;
66 default:
67 break;
70 return true;
73 #undef TARGET_HANDLE_OPTION
74 #define TARGET_HANDLE_OPTION rx_handle_option
76 #undef TARGET_EXCEPT_UNWIND_INFO
77 #define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
79 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;