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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [cpu-arc.c] - Blame information for rev 249

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

Line No. Rev Author Line
1 14 khays
/* BFD support for the ARC processor
2
   Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007
3
   Free Software Foundation, Inc.
4
   Contributed by Doug Evans (dje@cygnus.com).
5
 
6
   This file is part of BFD, the Binary File Descriptor library.
7
 
8
   This program 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 of the License, or
11
   (at your option) any later version.
12
 
13
   This program 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 this program; if not, write to the Free Software
20
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21
   MA 02110-1301, USA.  */
22
 
23
#include "sysdep.h"
24
#include "bfd.h"
25
#include "libbfd.h"
26
 
27
#define ARC(mach, print_name, default_p, next) \
28
{                                       \
29
    32, /* 32 bits in a word  */        \
30
    32, /* 32 bits in an address  */    \
31
    8,  /* 8 bits in a byte  */         \
32
    bfd_arch_arc,                       \
33
    mach,                               \
34
    "arc",                              \
35
    print_name,                         \
36
    4, /* section alignment power  */   \
37
    default_p,                          \
38
    bfd_default_compatible,             \
39
    bfd_default_scan,                   \
40 166 khays
    bfd_arch_default_fill,              \
41 14 khays
    next,                               \
42
  }
43
 
44
static const bfd_arch_info_type arch_info_struct[] =
45
{
46
  ARC ( bfd_mach_arc_5, "arc5", FALSE, &arch_info_struct[1] ),
47
  ARC ( bfd_mach_arc_5, "base", FALSE, &arch_info_struct[2] ),
48
  ARC ( bfd_mach_arc_6, "arc6", FALSE, &arch_info_struct[3] ),
49
  ARC ( bfd_mach_arc_7, "arc7", FALSE, &arch_info_struct[4] ),
50
  ARC ( bfd_mach_arc_8, "arc8", FALSE, NULL ),
51
};
52
 
53
const bfd_arch_info_type bfd_arc_arch =
54
  ARC ( bfd_mach_arc_6, "arc", TRUE, &arch_info_struct[0] );
55
 
56
/* Utility routines.  */
57
 
58
/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
59
   Returns -1 if not found.  */
60
 
61
int arc_get_mach PARAMS ((char *));
62
 
63
int
64
arc_get_mach (name)
65
     char *name;
66
{
67
  const bfd_arch_info_type *p;
68
 
69
  for (p = &bfd_arc_arch; p != NULL; p = p->next)
70
    if (strcmp (name, p->printable_name) == 0)
71
      return p->mach;
72
  return -1;
73
}

powered by: WebSVN 2.1.0

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