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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [utils/] [or32-idecode/] [or32-opc.c] - Diff between revs 6 and 673

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

Rev 6 Rev 673
Line 485... Line 485...
        //if (*enc == '0' || *enc == '1' || *enc == '-' || ISALPHA (*enc))
        //if (*enc == '0' || *enc == '1' || *enc == '-' || ISALPHA (*enc))
        if (*enc == '0' || *enc == '1' || *enc == '-' || isalpha (*enc))
        if (*enc == '0' || *enc == '1' || *enc == '-' || isalpha (*enc))
          {
          {
            opc_pos--;
            opc_pos--;
            if (param_ch == *enc)
            if (param_ch == *enc)
              ret |= 1 << opc_pos;
              ret |= 1UL << opc_pos;
          }
          }
        enc++;
        enc++;
      }
      }
  return ret;
  return ret;
}
}
Line 588... Line 588...
      debug (8, "%li> #### %i << %i (%i) ####\n",
      debug (8, "%li> #### %i << %i (%i) ####\n",
             (long)(cur - automata), best_len, best_first, ninstr);
             (long)(cur - automata), best_len, best_first, ninstr);
 
 
      *cur = best_first;
      *cur = best_first;
      cur++;
      cur++;
      *cur = (1 << best_len) - 1;
      *cur = (1UL << best_len) - 1;
      cur++;
      cur++;
      next = cur;
      next = cur;
 
 
      /* Allocate space for pointers.  */
      /* Allocate space for pointers.  */
      cur += 1 << best_len;
      cur += 1UL << best_len;
      cur_mask = (1 << (unsigned long) best_len) - 1;
      cur_mask = (1UL << (unsigned long) best_len) - 1;
 
 
      for (i = 0; i < ((unsigned) 1 << best_len); i++)
      for (i = 0; i < (1U << best_len); i++)
        {
        {
          unsigned int j;
          unsigned int j;
          unsigned long *c;
          unsigned long *c;
 
 
          curpass++;
          curpass++;
Line 708... Line 708...
                  mask++;
                  mask++;
                  tmp >>= 1;
                  tmp >>= 1;
                }
                }
              cur->type = type | shr;
              cur->type = type | shr;
              cur->data = mask;
              cur->data = mask;
              arg &= ~(((1 << mask) - 1) << shr);
              arg &= ~(((1UL << mask) - 1) << shr);
              debug (6, "|%08lX %08lX\n", cur->type, cur->data);
              debug (6, "|%08lX %08lX\n", cur->type, cur->data);
              cur++;
              cur++;
        num_cur_op++;
        num_cur_op++;
            }
            }
          args++;
          args++;
Line 893... Line 893...
  int letter_bits;
  int letter_bits;
 
 
  /* First truncate all bits above valid range for this letter
  /* First truncate all bits above valid range for this letter
     in case it is zero extend.  */
     in case it is zero extend.  */
  letter_bits = letter_range (l);
  letter_bits = letter_range (l);
  mask = (1 << letter_bits) - 1;
  mask = (1UL << letter_bits) - 1;
  imm &= mask;
  imm &= mask;
 
 
  /* Do sign extend if this is the right one.  */
  /* Do sign extend if this is the right one.  */
  if (letter_signed(l) && (imm >> (letter_bits - 1)))
  if (letter_signed(l) && (imm >> (letter_bits - 1)))
    imm |= (~mask);
    imm |= (~mask);
Line 945... Line 945...
      }
      }
    else if ((*enc == '0') || (*enc == '1'))
    else if ((*enc == '0') || (*enc == '1'))
      {
      {
        opc_pos--;
        opc_pos--;
        if (param_ch == *enc)
        if (param_ch == *enc)
          ret |= 1 << opc_pos;
          ret |= 1UL << opc_pos;
        enc++;
        enc++;
      }
      }
    else if (*enc == param_ch)
    else if (*enc == param_ch)
      {
      {
        opc_pos--;
        opc_pos--;

powered by: WebSVN 2.1.0

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