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

Subversion Repositories open8_urisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 khays
/* BFD library support routines for the Open8 architecture.
2
   Copyright 1999, 2000, 2002, 2005, 2006, 2007, 2008, 2010, 2011
3
   Free Software Foundation, Inc.
4
 
5
   Contributed by Kirk Hays <khays@hayshaus.com>
6
 
7
   This file is part of BFD, the Binary File Descriptor library.
8
 
9
   This program is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 3 of the License, or
12
   (at your option) any later version.
13
 
14
   This program is distributed in the hope that it will be useful,
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   GNU General Public License for more details.
18
 
19
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22
   MA 02110-1301, USA.  */
23
 
24
#include "sysdep.h"
25
#include "bfd.h"
26
#include "libbfd.h"
27
 
28
/* This routine is provided two arch_infos and works out which Open8
29
   machine which would be compatible with both and returns a pointer
30
   to its info structure.  */
31
 
32
static const bfd_arch_info_type *
33
compatible (const bfd_arch_info_type * a,
34
            const bfd_arch_info_type * b)
35
{
36
  /* If a & b are for different architectures we can do nothing.  */
37
  if (a->arch != b->arch)
38
    return NULL;
39
 
40
  if (a->mach == b->mach)
41
    return a;
42
 
43
  return NULL;
44
}
45
 
46
#define N(addr_bits, machine, print, default, next)                     \
47
  {                                                                     \
48
    8,                          /* 8 bits in a word.  */                \
49
      addr_bits,                /* bits in an address.  */              \
50
      8,                        /* 8 bits in a byte.  */                \
51
      bfd_arch_open8,                                                   \
52
      machine,                  /* Machine number.  */                  \
53
      "open8",                  /* Architecture name.  */               \
54
      print,                    /* Printable name.  */                  \
55
      1,                        /* Section align power.  */             \
56
  default,                      /* Is this the default?  */             \
57
      compatible,                                                       \
58
      bfd_default_scan,                                                 \
59 166 khays
      bfd_arch_default_fill,                                            \
60 14 khays
      next                                                              \
61
      }
62
 
63
static const bfd_arch_info_type arch_info_struct[] =
64
  {
65
    /* Base Architecture - instructions common to all variants, base ABI.  */
66
    N (16, bfd_mach_open8_1, "open8", TRUE, NULL),
67
  };
68
 
69
const bfd_arch_info_type bfd_open8_arch =
70
  N (16, bfd_mach_open8_1, "open8", TRUE, NULL);

powered by: WebSVN 2.1.0

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