OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [common/] [config/] [mn10300/] [mn10300-common.c] - Blame information for rev 714

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 708 jeremybenn
/* Common hooks for Matsushita MN10300 series.
2
   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3
   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4
 
5
   This file is part of GCC.
6
 
7
   GCC is free software; you can redistribute it and/or modify
8
   it under the terms of the GNU General Public License as published by
9
   the Free Software Foundation; either version 3, or (at your option)
10
   any later version.
11
 
12
   GCC is distributed in the hope that it will be useful,
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
   GNU General Public License for more details.
16
 
17
   You should have received a copy of the GNU General Public License
18
   along with GCC; see the file COPYING3.  If not see
19
   <http://www.gnu.org/licenses/>.  */
20
 
21
#include "config.h"
22
#include "system.h"
23
#include "coretypes.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"
29
 
30
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
31
static const struct default_options mn10300_option_optimization_table[] =
32
  {
33
    { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
34
    { OPT_LEVELS_NONE, 0, NULL, 0 }
35
  };
36
 
37
/* Implement TARGET_HANDLE_OPTION.  */
38
 
39
static bool
40
mn10300_handle_option (struct gcc_options *opts,
41
                       struct gcc_options *opts_set ATTRIBUTE_UNUSED,
42
                       const struct cl_decoded_option *decoded,
43
                       location_t loc ATTRIBUTE_UNUSED)
44
{
45
  size_t code = decoded->opt_index;
46
  int value = decoded->value;
47
 
48
  switch (code)
49
    {
50
    case OPT_mam33:
51
      opts->x_mn10300_processor = value ? PROCESSOR_AM33 : PROCESSOR_MN10300;
52
      return true;
53
 
54
    case OPT_mam33_2:
55
      opts->x_mn10300_processor = (value
56
                                   ? PROCESSOR_AM33_2
57
                                   : MIN (PROCESSOR_AM33, PROCESSOR_DEFAULT));
58
      return true;
59
 
60
    case OPT_mam34:
61
      opts->x_mn10300_processor = (value ? PROCESSOR_AM34 : PROCESSOR_DEFAULT);
62
      return true;
63
 
64
    default:
65
      return true;
66
    }
67
}
68
 
69
#undef  TARGET_EXCEPT_UNWIND_INFO
70
#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
71
 
72
#undef  TARGET_DEFAULT_TARGET_FLAGS
73
#define TARGET_DEFAULT_TARGET_FLAGS MASK_MULT_BUG | MASK_PTR_A0D0 | MASK_ALLOW_LIW | MASK_ALLOW_SETLB
74
#undef  TARGET_HANDLE_OPTION
75
#define TARGET_HANDLE_OPTION mn10300_handle_option
76
#undef  TARGET_OPTION_OPTIMIZATION_TABLE
77
#define TARGET_OPTION_OPTIMIZATION_TABLE mn10300_option_optimization_table
78
 
79
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.