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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 708 jeremybenn
/* HPPA common hooks.
2
   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
3
   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License 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
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
32
static const struct default_options pa_option_optimization_table[] =
33
  {
34
    { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
35
    { OPT_LEVELS_NONE, 0, NULL, 0 }
36
  };
37
 
38
/* Implement TARGET_HANDLE_OPTION.  */
39
 
40
static bool
41
pa_handle_option (struct gcc_options *opts,
42
                  struct gcc_options *opts_set ATTRIBUTE_UNUSED,
43
                  const struct cl_decoded_option *decoded,
44
                  location_t loc ATTRIBUTE_UNUSED)
45
{
46
  size_t code = decoded->opt_index;
47
 
48
  switch (code)
49
    {
50
    case OPT_mnosnake:
51
    case OPT_mpa_risc_1_0:
52
    case OPT_march_1_0:
53
      opts->x_target_flags &= ~(MASK_PA_11 | MASK_PA_20);
54
      return true;
55
 
56
    case OPT_msnake:
57
    case OPT_mpa_risc_1_1:
58
    case OPT_march_1_1:
59
      opts->x_target_flags &= ~MASK_PA_20;
60
      opts->x_target_flags |= MASK_PA_11;
61
      return true;
62
 
63
    case OPT_mpa_risc_2_0:
64
    case OPT_march_2_0:
65
      opts->x_target_flags |= MASK_PA_11 | MASK_PA_20;
66
      return true;
67
 
68
    default:
69
      return true;
70
    }
71
}
72
 
73
#undef TARGET_OPTION_OPTIMIZATION_TABLE
74
#define TARGET_OPTION_OPTIMIZATION_TABLE pa_option_optimization_table
75
#undef TARGET_DEFAULT_TARGET_FLAGS
76
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | TARGET_CPU_DEFAULT)
77
#undef TARGET_HANDLE_OPTION
78
#define TARGET_HANDLE_OPTION pa_handle_option
79
 
80
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.