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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [cpu/] [or32/] [or32.c] - Diff between revs 230 and 240

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

Rev 230 Rev 240
Line 667... Line 667...
          }
          }
        enc += 3;
        enc += 3;
      }
      }
    else
    else
      {
      {
        if (*enc == '0' || *enc == '1' || *enc == '-' || isalpha (*enc))
        if (*enc == '0' || *enc == '1' || *enc == '-' || isalpha ((int)*enc))
          {
          {
            opc_pos--;
            opc_pos--;
            if (param_ch == *enc)
            if (param_ch == *enc)
              ret |= 1 << opc_pos;
              ret |= 1 << opc_pos;
          }
          }
Line 865... Line 865...
          args++;
          args++;
          type |= OPTYPE_REG;
          type |= OPTYPE_REG;
          if (*args == 'D')
          if (*args == 'D')
            type |= OPTYPE_DST;
            type |= OPTYPE_DST;
        }
        }
      else if (isalpha (*args))
      else if (isalpha ((int)*args))
        {
        {
          unsigned long arg;
          unsigned long arg;
          arg = insn_extract (*args, opcode->encoding);
          arg = insn_extract (*args, opcode->encoding);
          or32_debug (9, "%s : %08lX ------\n", opcode->name, arg);
          or32_debug (9, "%s : %08lX ------\n", opcode->name, arg);
          if (letter_signed (*args))
          if (letter_signed (*args))
Line 1161... Line 1161...
        param_pos--;
        param_pos--;
#if DEBUG
#if DEBUG
        printf ("\n  ret=%x opc_pos=%x, param_pos=%x\n", ret, opc_pos,
        printf ("\n  ret=%x opc_pos=%x, param_pos=%x\n", ret, opc_pos,
                param_pos);
                param_pos);
#endif
#endif
        if (islower (param_ch))
        if (islower ((int) param_ch))
          ret -= ((insn >> opc_pos) & 0x1) << param_pos;
          ret -= ((insn >> opc_pos) & 0x1) << param_pos;
        else
        else
          ret += ((insn >> opc_pos) & 0x1) << param_pos;
          ret += ((insn >> opc_pos) & 0x1) << param_pos;
        enc++;
        enc++;
      }
      }
    else if (isalpha (*enc))
    else if (isalpha ((int)*enc))
      {
      {
        opc_pos--;
        opc_pos--;
        enc++;
        enc++;
      }
      }
    else if (*enc == '-')
    else if (*enc == '-')

powered by: WebSVN 2.1.0

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