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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [archures.c] - Diff between revs 14 and 148

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 14 Rev 148
Line 1... Line 1...
/* BFD library support routines for architectures.
/* BFD library support routines for architectures.
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
   Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 435... Line 435...
.#define bfd_mach_z80full        7 {* All undocumented instructions.  *}
.#define bfd_mach_z80full        7 {* All undocumented instructions.  *}
.#define bfd_mach_r800           11 {* R800: successor with multiplication.  *}
.#define bfd_mach_r800           11 {* R800: successor with multiplication.  *}
.  bfd_arch_lm32,      {* Lattice Mico32 *}
.  bfd_arch_lm32,      {* Lattice Mico32 *}
.#define bfd_mach_lm32      1
.#define bfd_mach_lm32      1
.  bfd_arch_microblaze,{* Xilinx MicroBlaze. *}
.  bfd_arch_microblaze,{* Xilinx MicroBlaze. *}
 
.  bfd_arch_tilepro,   {* Tilera TILEPro *}
 
.  bfd_arch_tilegx, {* Tilera TILE-Gx *}
 
.#define bfd_mach_tilepro   1
 
.#define bfd_mach_tilegx    1
.  bfd_arch_open8,       {* Open8/ARClite/V8 microcontrollers.  *}
.  bfd_arch_open8,       {* Open8/ARClite/V8 microcontrollers.  *}
.#define bfd_mach_open8_1               1
.#define bfd_mach_open8_1               1
.  bfd_arch_last
.  bfd_arch_last
.  };
.  };
*/
*/
Line 538... Line 542...
extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_tic4x_arch;
extern const bfd_arch_info_type bfd_tic4x_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
extern const bfd_arch_info_type bfd_tic6x_arch;
extern const bfd_arch_info_type bfd_tic6x_arch;
extern const bfd_arch_info_type bfd_tic80_arch;
extern const bfd_arch_info_type bfd_tic80_arch;
 
extern const bfd_arch_info_type bfd_tilegx_arch;
 
extern const bfd_arch_info_type bfd_tilepro_arch;
extern const bfd_arch_info_type bfd_v850_arch;
extern const bfd_arch_info_type bfd_v850_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
Line 613... Line 619...
    &bfd_tic30_arch,
    &bfd_tic30_arch,
    &bfd_tic4x_arch,
    &bfd_tic4x_arch,
    &bfd_tic54x_arch,
    &bfd_tic54x_arch,
    &bfd_tic6x_arch,
    &bfd_tic6x_arch,
    &bfd_tic80_arch,
    &bfd_tic80_arch,
 
    &bfd_tilegx_arch,
 
    &bfd_tilepro_arch,
    &bfd_v850_arch,
    &bfd_v850_arch,
    &bfd_vax_arch,
    &bfd_vax_arch,
    &bfd_w65_arch,
    &bfd_w65_arch,
    &bfd_we32k_arch,
    &bfd_we32k_arch,
    &bfd_xstormy16_arch,
    &bfd_xstormy16_arch,
Line 750... Line 758...
const bfd_arch_info_type *
const bfd_arch_info_type *
bfd_arch_get_compatible (const bfd *abfd,
bfd_arch_get_compatible (const bfd *abfd,
                         const bfd *bbfd,
                         const bfd *bbfd,
                         bfd_boolean accept_unknowns)
                         bfd_boolean accept_unknowns)
{
{
  const bfd * ubfd = NULL;
  const bfd *ubfd, *kbfd;
 
 
  /* Look for an unknown architecture.  */
  /* Look for an unknown architecture.  */
  if (((ubfd = abfd) && ubfd->arch_info->arch == bfd_arch_unknown)
  if (abfd->arch_info->arch == bfd_arch_unknown)
      || ((ubfd = bbfd) && ubfd->arch_info->arch == bfd_arch_unknown))
    ubfd = abfd, kbfd = bbfd;
    {
  else if (bbfd->arch_info->arch == bfd_arch_unknown)
 
    ubfd = bbfd, kbfd = abfd;
 
  else
 
    /* Otherwise architecture-specific code has to decide.  */
 
    return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info);
 
 
      /* We can allow an unknown architecture if accept_unknowns
      /* We can allow an unknown architecture if accept_unknowns
         is true, or if the target is the "binary" format, which
         is true, or if the target is the "binary" format, which
         has an unknown architecture.  Since the binary format can
         has an unknown architecture.  Since the binary format can
         only be set by explicit request from the user, it is safe
         only be set by explicit request from the user, it is safe
         to assume that they know what they are doing.  */
         to assume that they know what they are doing.  */
      if (accept_unknowns
      if (accept_unknowns
          || strcmp (bfd_get_target (ubfd), "binary") == 0)
          || strcmp (bfd_get_target (ubfd), "binary") == 0)
        return ubfd->arch_info;
    return kbfd->arch_info;
      return NULL;
      return NULL;
    }
    }
 
 
  /* Otherwise architecture-specific code has to decide.  */
 
  return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info);
 
}
 
 
 
/*
/*
INTERNAL_DEFINITION
INTERNAL_DEFINITION
        bfd_default_arch_struct
        bfd_default_arch_struct
 
 
DESCRIPTION
DESCRIPTION

powered by: WebSVN 2.1.0

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