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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_55/] [or1ksim/] [cuc/] [load.c] - Diff between revs 897 and 898

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

Rev 897 Rev 898
Line 26... Line 26...
#include "opcode/or32.h"
#include "opcode/or32.h"
#include "insn.h"
#include "insn.h"
 
 
static const cuc_conv conv[] = {
static const cuc_conv conv[] = {
{"l.add", II_ADD}, {"l.addi", II_ADD},
{"l.add", II_ADD}, {"l.addi", II_ADD},
 
{"l.movhi", II_OR},
{"l.sub", II_SUB}, {"l.subi", II_SUB},
{"l.sub", II_SUB}, {"l.subi", II_SUB},
{"l.and", II_AND}, {"l.andi", II_AND},
{"l.and", II_AND}, {"l.andi", II_AND},
{"l.xor", II_XOR}, {"l.xori", II_XOR},
{"l.xor", II_XOR}, {"l.xori", II_XOR},
{"l.or",  II_OR }, {"l.ori",  II_OR},
{"l.or",  II_OR }, {"l.ori",  II_OR},
{"l.mul", II_MUL}, {"l.muli", II_MUL},
{"l.mul", II_MUL}, {"l.muli", II_MUL},
Line 372... Line 373...
          if (conv[j].to & II_SIGNED) insn[i].type |= IT_SIGNED;
          if (conv[j].to & II_SIGNED) insn[i].type |= IT_SIGNED;
          if (conv[j].to & II_MEM) insn[i].type |= IT_MEMORY | IT_VOLATILE;
          if (conv[j].to & II_MEM) insn[i].type |= IT_MEMORY | IT_VOLATILE;
          change_insn_type (&insn[i], conv[j].to & II_MASK);
          change_insn_type (&insn[i], conv[j].to & II_MASK);
          break;
          break;
        }
        }
 
      if (strcmp (name, "l.movhi") == 0) {
 
        insn[i].op[1] <<= 16;
 
        insn[i].op[2] = 0;
 
        insn[i].opt[2] = OPT_CONST;
 
      }
      if (insn[i].index < 0 || insn[i].index == II_NOP && insn[i].op[0] != 0) {
      if (insn[i].index < 0 || insn[i].index == II_NOP && insn[i].op[0] != 0) {
        cucdebug (1, "Instruction #%i: \"%s\" not supported (2).\n", i, name);
        cucdebug (1, "Instruction #%i: \"%s\" not supported (2).\n", i, name);
        log ("Instruction #%i: \"%s\" not supported (2).\n", i, name);
        log ("Instruction #%i: \"%s\" not supported (2).\n", i, name);
        return 1;
        return 1;
      }
      }

powered by: WebSVN 2.1.0

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