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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc1/] [or1ksim/] [cuc/] [load.c] - Diff between revs 1350 and 1748

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

Rev 1350 Rev 1748
Line 19... Line 19...
 
 
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdarg.h>
#include <assert.h>
#include <assert.h>
#include <string.h>
 
 
 
#include "config.h"
#include "config.h"
 
 
#ifdef HAVE_INTTYPES_H
 
#include <inttypes.h>
 
#endif
 
 
 
#include "port.h"
#include "port.h"
#include "arch.h"
#include "arch.h"
#include "abstract.h"
#include "abstract.h"
#include "sim-config.h"
#include "sim-config.h"
#include "cuc.h"
#include "cuc.h"
Line 192... Line 187...
/* Disassemble one instruction from insn index and generate parameters */
/* Disassemble one instruction from insn index and generate parameters */
const char *build_insn (unsigned long data, cuc_insn *insn)
const char *build_insn (unsigned long data, cuc_insn *insn)
{
{
  const char *name;
  const char *name;
  char *s;
  char *s;
  extern char *disassembled;
 
  int index = insn_decode (data);
  int index = insn_decode (data);
  struct or32_opcode const *opcode;
  struct or32_opcode const *opcode;
  int i, argc = 0;
  int i, argc = 0;
 
 
  insn->insn = data;
  insn->insn = data;
Line 492... Line 486...
        insn[i].op[1] = insn[i].op[0]; insn[i].opt[1] = insn[i].opt[0] & ~OPT_DEST;
        insn[i].op[1] = insn[i].op[0]; insn[i].opt[1] = insn[i].opt[0] & ~OPT_DEST;
        insn[i].op[0] = FLAG_REG; insn[i].opt[0] = OPT_DEST | OPT_REGISTER;
        insn[i].op[0] = FLAG_REG; insn[i].opt[0] = OPT_DEST | OPT_REGISTER;
        insn[i].opt[3] = OPT_NONE;
        insn[i].opt[3] = OPT_NONE;
        insn[i].type |= IT_COND;
        insn[i].type |= IT_COND;
      }
      }
      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.