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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [config/] [rx-parse.y] - Diff between revs 16 and 163

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

Rev 16 Rev 163
Line 1168... Line 1168...
 
 
  if (rx_lex_start == rx_lex_end)
  if (rx_lex_start == rx_lex_end)
    return 0;
    return 0;
 
 
  if (ISALPHA (*rx_lex_start)
  if (ISALPHA (*rx_lex_start)
 
      || (rx_pid_register != -1 && memcmp (rx_lex_start, "%pidreg", 7) == 0)
 
      || (rx_gp_register != -1 && memcmp (rx_lex_start, "%gpreg", 6) == 0)
      || (*rx_lex_start == '.' && ISALPHA (rx_lex_start[1])))
      || (*rx_lex_start == '.' && ISALPHA (rx_lex_start[1])))
    {
    {
      unsigned int i;
      unsigned int i;
      char * e;
      char * e;
      char save;
      char save;
Line 1181... Line 1183...
           e ++)
           e ++)
        ;
        ;
      save = *e;
      save = *e;
      *e = 0;
      *e = 0;
 
 
 
      if (strcmp (rx_lex_start, "%pidreg") == 0)
 
        {
 
          {
 
            rx_lval.regno = rx_pid_register;
 
            *e = save;
 
            rx_lex_start = e;
 
            rx_last_token = REG;
 
            return REG;
 
          }
 
        }
 
 
 
      if (strcmp (rx_lex_start, "%gpreg") == 0)
 
        {
 
          {
 
            rx_lval.regno = rx_gp_register;
 
            *e = save;
 
            rx_lex_start = e;
 
            rx_last_token = REG;
 
            return REG;
 
          }
 
        }
 
 
      if (rx_last_token == 0)
      if (rx_last_token == 0)
        for (ci = 0; ci < NUM_CONDITION_OPCODES; ci ++)
        for (ci = 0; ci < NUM_CONDITION_OPCODES; ci ++)
          if (check_condition (condition_opcode_table[ci].string))
          if (check_condition (condition_opcode_table[ci].string))
            {
            {
              *e = save;
              *e = save;
Line 1251... Line 1275...
  rx_last_token = EXPR;
  rx_last_token = EXPR;
  return EXPR;
  return EXPR;
}
}
 
 
int
int
rx_error (char * str)
rx_error (const char * str)
{
{
  int len;
  int len;
 
 
  len = rx_last_exp_start - rx_init_start;
  len = rx_last_exp_start - rx_init_start;
 
 
Line 1480... Line 1504...
          O2 (exp);
          O2 (exp);
          return 2;
          return 2;
        }
        }
    }
    }
 
 
 
  if (exp.X_op == O_subtract)
 
    {
 
      exp.X_md = BFD_RELOC_RX_DIFF;
 
      O2 (exp);
 
      return 2;
 
    }
 
 
  if (exp.X_op != O_constant)
  if (exp.X_op != O_constant)
    {
    {
      rx_error (_("displacements must be constants"));
      rx_error (_("displacements must be constants"));
      return -1;
      return -1;
    }
    }

powered by: WebSVN 2.1.0

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