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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [config/] [tc-cr16.c] - Diff between revs 16 and 148

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

Rev 16 Rev 148
Line 520... Line 520...
 
 
arelent *
arelent *
tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
{
{
  arelent * reloc;
  arelent * reloc;
  bfd_reloc_code_real_type code;
 
 
 
  /* If symbols are local and resolved, then no relocation needed.  */
  /* If symbols are local and resolved, then no relocation needed.  */
  if ( ((fixP->fx_addsy)
  if ( ((fixP->fx_addsy)
        && (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section))
        && (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section))
       || ((fixP->fx_subsy)
       || ((fixP->fx_subsy)
Line 580... Line 579...
#ifdef OBJ_ELF
#ifdef OBJ_ELF
      if ((fixP->fx_r_type == BFD_RELOC_CR16_GOT_REGREL20)
      if ((fixP->fx_r_type == BFD_RELOC_CR16_GOT_REGREL20)
           && GOT_symbol
           && GOT_symbol
           && fixP->fx_addsy == GOT_symbol)
           && fixP->fx_addsy == GOT_symbol)
        {
        {
            code = BFD_RELOC_CR16_GOT_REGREL20;
 
            reloc->addend = fixP->fx_offset = reloc->address;
            reloc->addend = fixP->fx_offset = reloc->address;
        }
        }
      else if ((fixP->fx_r_type == BFD_RELOC_CR16_GOTC_REGREL20)
      else if ((fixP->fx_r_type == BFD_RELOC_CR16_GOTC_REGREL20)
           && GOT_symbol
           && GOT_symbol
           && fixP->fx_addsy == GOT_symbol)
           && fixP->fx_addsy == GOT_symbol)
        {
        {
            code = BFD_RELOC_CR16_GOTC_REGREL20;
 
            reloc->addend = fixP->fx_offset = reloc->address;
            reloc->addend = fixP->fx_offset = reloc->address;
        }
        }
#endif
#endif
 
 
  gas_assert ((int) fixP->fx_r_type > 0);
  gas_assert ((int) fixP->fx_r_type > 0);
Line 1547... Line 1544...
  return 0;
  return 0;
}
}
 
 
/* Cinv instruction requires special handling.  */
/* Cinv instruction requires special handling.  */
 
 
static int
static void
check_cinv_options (char * operand)
check_cinv_options (char * operand)
{
{
  char *p = operand;
  char *p = operand;
  int i_used = 0, u_used = 0, d_used = 0;
 
 
 
  while (*++p != ']')
  while (*++p != ']')
    {
    {
      if (*p == ',' || *p == ' ')
      switch (*p)
        continue;
        {
 
        case ',':
      else if (*p == 'i')
        case ' ':
        i_used = 1;
        case 'i':
      else if (*p == 'u')
        case 'u':
        u_used = 1;
        case 'd':
      else if (*p == 'd')
          break;
        d_used = 1;
        default:
      else
 
        as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
        as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
    }
    }
 
    }
  return 0;
 
}
}
 
 
/* Retrieve the opcode image of a given register pair.
/* Retrieve the opcode image of a given register pair.
   If the register is illegal for the current instruction,
   If the register is illegal for the current instruction,
   issue an error.  */
   issue an error.  */
Line 2502... Line 2496...
void
void
md_assemble (char *op)
md_assemble (char *op)
{
{
  ins cr16_ins;
  ins cr16_ins;
  char *param, param1[32];
  char *param, param1[32];
  char c;
 
 
 
  /* Reset global variables for a new instruction.  */
  /* Reset global variables for a new instruction.  */
  reset_vars (op);
  reset_vars (op);
 
 
  /* Strip the mnemonic.  */
  /* Strip the mnemonic.  */
  for (param = op; *param != 0 && !ISSPACE (*param); param++)
  for (param = op; *param != 0 && !ISSPACE (*param); param++)
    ;
    ;
  c = *param;
 
  *param++ = '\0';
  *param++ = '\0';
 
 
  /* bCC instuctions and adjust the mnemonic by adding extra white spaces.  */
  /* bCC instuctions and adjust the mnemonic by adding extra white spaces.  */
  if (is_bcc_insn (op))
  if (is_bcc_insn (op))
    {
    {

powered by: WebSVN 2.1.0

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