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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [cgen.c] - Diff between revs 147 and 163

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

Rev 147 Rev 163
Line 1... Line 1...
/* GAS interface for targets using CGEN: Cpu tools GENerator.
/* GAS interface for targets using CGEN: Cpu tools GENerator.
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2009, 2010 Free Software Foundation, Inc.
   2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 
   This file is part of GAS, the GNU Assembler.
   This file is part of GAS, the GNU Assembler.
 
 
   GAS is free software; you can redistribute it and/or modify
   GAS is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
Line 1016... Line 1016...
     See the comment describing fx_addnumber in write.h.
     See the comment describing fx_addnumber in write.h.
     This field is misnamed (or misused :-).  */
     This field is misnamed (or misused :-).  */
  fixP->fx_addnumber = value;
  fixP->fx_addnumber = value;
}
}
 
 
 
bfd_reloc_code_real_type
 
gas_cgen_pcrel_r_type (bfd_reloc_code_real_type r)
 
{
 
  switch (r)
 
    {
 
    case BFD_RELOC_8:  r = BFD_RELOC_8_PCREL;  break;
 
    case BFD_RELOC_16: r = BFD_RELOC_16_PCREL; break;
 
    case BFD_RELOC_24: r = BFD_RELOC_24_PCREL; break;
 
    case BFD_RELOC_32: r = BFD_RELOC_32_PCREL; break;
 
    case BFD_RELOC_64: r = BFD_RELOC_64_PCREL; break;
 
    default:
 
      break;
 
    }
 
  return r;
 
}
 
 
/* Translate internal representation of relocation info to BFD target format.
/* Translate internal representation of relocation info to BFD target format.
 
 
   FIXME: To what extent can we get all relevant targets to use this?  */
   FIXME: To what extent can we get all relevant targets to use this?  */
 
 
arelent *
arelent *
gas_cgen_tc_gen_reloc (section, fixP)
gas_cgen_tc_gen_reloc (section, fixP)
     asection * section ATTRIBUTE_UNUSED;
     asection * section ATTRIBUTE_UNUSED;
     fixS *     fixP;
     fixS *     fixP;
{
{
 
  bfd_reloc_code_real_type r_type = fixP->fx_r_type;
  arelent *reloc;
  arelent *reloc;
 
 
  reloc = (arelent *) xmalloc (sizeof (arelent));
  reloc = (arelent *) xmalloc (sizeof (arelent));
 
 
  reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
#ifdef GAS_CGEN_PCREL_R_TYPE
 
  if (fixP->fx_pcrel)
 
    r_type = GAS_CGEN_PCREL_R_TYPE (r_type);
 
#endif
 
  reloc->howto = bfd_reloc_type_lookup (stdoutput, r_type);
 
 
  if (reloc->howto == (reloc_howto_type *) NULL)
  if (reloc->howto == (reloc_howto_type *) NULL)
    {
    {
      as_bad_where (fixP->fx_file, fixP->fx_line,
      as_bad_where (fixP->fx_file, fixP->fx_line,
                    _("relocation is not supported"));
                    _("relocation is not supported"));
      return NULL;
      return NULL;

powered by: WebSVN 2.1.0

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