1 /* Common hooks for Toshiba Media Processor.
2 Copyright (C) 2001-2013 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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"
24 #include "common/common-target.h"
25 #include "common/common-target-def.h"
29 static const struct default_options mep_option_optimization_table
[] =
31 /* The first scheduling pass often increases register pressure and
32 tends to result in more spill code. Only run it when
33 specifically asked. */
34 { OPT_LEVELS_ALL
, OPT_fschedule_insns
, NULL
, 0 },
36 /* Using $fp doesn't gain us much, even when debugging is
38 { OPT_LEVELS_ALL
, OPT_fomit_frame_pointer
, NULL
, 1 },
40 { OPT_LEVELS_NONE
, 0, NULL
, 0 }
44 mep_handle_option (struct gcc_options
*opts
,
45 struct gcc_options
*opts_set ATTRIBUTE_UNUSED
,
46 const struct cl_decoded_option
*decoded
,
47 location_t loc ATTRIBUTE_UNUSED
)
49 size_t code
= decoded
->opt_index
;
54 opts
->x_target_flags
|= MEP_ALL_OPTS
;
58 opts
->x_target_flags
&= ~ MEP_ALL_OPTS
;
62 opts
->x_target_flags
|= MASK_COP
;
63 opts
->x_target_flags
|= MASK_64BIT_CR_REGS
;
67 opts
->x_target_flags
|= MASK_COP
;
68 opts
->x_target_flags
|= MASK_64BIT_CR_REGS
;
69 opts
->x_target_flags
|= MASK_VLIW
;
70 opts
->x_target_flags
|= MASK_OPT_VL64
;
71 opts
->x_target_flags
|= MASK_IVC2
;
73 /* Remaining handling of this option deferred. */
82 #undef TARGET_HANDLE_OPTION
83 #define TARGET_HANDLE_OPTION mep_handle_option
84 #undef TARGET_OPTION_OPTIMIZATION_TABLE
85 #define TARGET_OPTION_OPTIMIZATION_TABLE mep_option_optimization_table
86 #undef TARGET_DEFAULT_TARGET_FLAGS
87 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
89 struct gcc_targetm_common targetm_common
= TARGETM_COMMON_INITIALIZER
;