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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 708 jeremybenn
/* Common hooks for Toshiba Media Processor.
2
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
3
   2011
4
   Free Software Foundation, Inc.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify it under
9
the terms of the GNU General Public License as published by the Free
10
Software Foundation; either version 3, or (at your option) any later
11
version.
12
 
13
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14
WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16
for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>.  */
21
 
22
#include "config.h"
23
#include "system.h"
24
#include "coretypes.h"
25
#include "tm.h"
26
#include "common/common-target.h"
27
#include "common/common-target-def.h"
28
#include "opts.h"
29
#include "flags.h"
30
 
31
static const struct default_options mep_option_optimization_table[] =
32
  {
33
    /* The first scheduling pass often increases register pressure and
34
       tends to result in more spill code.  Only run it when
35
       specifically asked.  */
36
    { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
37
 
38
    /* Using $fp doesn't gain us much, even when debugging is
39
       important.  */
40
    { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 1 },
41
 
42
    { OPT_LEVELS_NONE, 0, NULL, 0 }
43
  };
44
 
45
static bool
46
mep_handle_option (struct gcc_options *opts,
47
                   struct gcc_options *opts_set ATTRIBUTE_UNUSED,
48
                   const struct cl_decoded_option *decoded,
49
                   location_t loc ATTRIBUTE_UNUSED)
50
{
51
  size_t code = decoded->opt_index;
52
 
53
  switch (code)
54
    {
55
    case OPT_mall_opts:
56
      opts->x_target_flags |= MEP_ALL_OPTS;
57
      break;
58
 
59
    case OPT_mno_opts:
60
      opts->x_target_flags &= ~ MEP_ALL_OPTS;
61
      break;
62
 
63
    case OPT_mcop64:
64
      opts->x_target_flags |= MASK_COP;
65
      opts->x_target_flags |= MASK_64BIT_CR_REGS;
66
      break;
67
 
68
    case OPT_mivc2:
69
      opts->x_target_flags |= MASK_COP;
70
      opts->x_target_flags |= MASK_64BIT_CR_REGS;
71
      opts->x_target_flags |= MASK_VLIW;
72
      opts->x_target_flags |= MASK_OPT_VL64;
73
      opts->x_target_flags |= MASK_IVC2;
74
 
75
      /* Remaining handling of this option deferred.  */
76
      break;
77
 
78
    default:
79
      break;
80
    }
81
  return TRUE;
82
}
83
 
84
#undef  TARGET_HANDLE_OPTION
85
#define TARGET_HANDLE_OPTION            mep_handle_option
86
#undef  TARGET_OPTION_OPTIMIZATION_TABLE
87
#define TARGET_OPTION_OPTIMIZATION_TABLE        mep_option_optimization_table
88
#undef  TARGET_DEFAULT_TARGET_FLAGS
89
#define TARGET_DEFAULT_TARGET_FLAGS     TARGET_DEFAULT
90
 
91
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.