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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 708 jeremybenn
/* Common hooks for DEC Alpha.
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 "diagnostic-core.h"
26
#include "tm.h"
27
#include "common/common-target.h"
28
#include "common/common-target-def.h"
29
#include "opts.h"
30
#include "flags.h"
31
 
32
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
33
static const struct default_options alpha_option_optimization_table[] =
34
  {
35
    { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
36
    /* Enable redundant extension instructions removal at -O2 and higher.  */
37
    { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
38
    { OPT_LEVELS_NONE, 0, NULL, 0 }
39
  };
40
 
41
/* Implement TARGET_OPTION_INIT_STRUCT.  */
42
 
43
static void
44
alpha_option_init_struct (struct gcc_options *opts ATTRIBUTE_UNUSED)
45
{
46
#if TARGET_ABI_OPEN_VMS
47
  /* Enable section anchors by default.  */
48
  opts->x_flag_section_anchors = 1;
49
#endif
50
}
51
 
52
/* Implement TARGET_HANDLE_OPTION.  */
53
 
54
static bool
55
alpha_handle_option (struct gcc_options *opts,
56
                     struct gcc_options *opts_set ATTRIBUTE_UNUSED,
57
                     const struct cl_decoded_option *decoded,
58
                     location_t loc)
59
{
60
  size_t code = decoded->opt_index;
61
  const char *arg = decoded->arg;
62
  int value = decoded->value;
63
 
64
  switch (code)
65
    {
66
    case OPT_mfp_regs:
67
      if (value == 0)
68
        opts->x_target_flags |= MASK_SOFT_FP;
69
      break;
70
 
71
    case OPT_mieee:
72
    case OPT_mieee_with_inexact:
73
      opts->x_target_flags |= MASK_IEEE_CONFORMANT;
74
      break;
75
 
76
    case OPT_mtls_size_:
77
      if (value != 16 && value != 32 && value != 64)
78
        error_at (loc, "bad value %qs for -mtls-size switch", arg);
79
      break;
80
    }
81
 
82
  return true;
83
}
84
 
85
#undef TARGET_DEFAULT_TARGET_FLAGS
86
#define TARGET_DEFAULT_TARGET_FLAGS \
87
  (TARGET_DEFAULT | TARGET_CPU_DEFAULT | TARGET_DEFAULT_EXPLICIT_RELOCS)
88
#undef TARGET_HANDLE_OPTION
89
#define TARGET_HANDLE_OPTION alpha_handle_option
90
 
91
#undef TARGET_OPTION_INIT_STRUCT
92
#define TARGET_OPTION_INIT_STRUCT alpha_option_init_struct
93
 
94
#undef TARGET_OPTION_OPTIMIZATION_TABLE
95
#define TARGET_OPTION_OPTIMIZATION_TABLE alpha_option_optimization_table
96
 
97
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.