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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [cpu/] [common/] [abstract.c] - Diff between revs 1557 and 1584

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

Rev 1557 Rev 1584
Line 969... Line 969...
  oraddr_t i, j;
  oraddr_t i, j;
  struct label_entry *tmp;
  struct label_entry *tmp;
  int ilen = disasm ? 4 : 16;
  int ilen = disasm ? 4 : 16;
 
 
  for(i = from; i < to; i += ilen) {
  for(i = from; i < to; i += ilen) {
    PRINTF("%"PRIxADDR": ", i);
 
    for (j = 0; j < ilen;) {
    for (j = 0; j < ilen;) {
      if (!disasm) {
      if (!disasm) {
        tmp = NULL;
        tmp = NULL;
        if (verify_memoryarea(i + j)) {
        if (verify_memoryarea(i + j)) {
          struct label_entry *entry;
          struct label_entry *entry;
          entry = get_label(i + j);
          entry = get_label(i + j);
          if (entry)
 
            PRINTF("(%s)", entry->name);
          if (entry) {
 
            PRINTF("\n%"PRIxADDR": ", i);
 
            PRINTF("\n<%s>:\n", entry->name);
 
            PRINTF("%"PRIxADDR": ", i);
 
          } else {
 
            PRINTF("%"PRIxADDR": ", i);
 
          }
 
 
          PRINTF("%02"PRIx8" ", eval_direct8(i + j, 0, 0));
          PRINTF("%02"PRIx8" ", eval_direct8(i + j, 0, 0));
        } else PRINTF("XX ");
        } else PRINTF("XX ");
        j++;
        j++;
      } else {
      } else {
        uint32_t _insn = eval_direct32(i, 0, 0);
        uint32_t _insn = eval_direct32(i, 0, 0);
Line 990... Line 997...
 
 
        tmp = NULL;
        tmp = NULL;
        if (verify_memoryarea(i + j)) {
        if (verify_memoryarea(i + j)) {
          struct label_entry *entry;
          struct label_entry *entry;
          entry = get_label(i + j);
          entry = get_label(i + j);
          if (entry)
 
            PRINTF("(%s)", entry->name);
 
 
 
          PRINTF(": %08"PRIx32" ", _insn);
          if (entry) {
 
            PRINTF("\n%"PRIxADDR": ", i);
 
            PRINTF("<%s>:\n", entry->name);
 
            PRINTF("%"PRIxADDR": ", i);
 
          } else {
 
            PRINTF("%"PRIxADDR": ", i);
 
          }
 
 
 
          PRINTF("%08"PRIx32" ", _insn);
          if (index >= 0) {
          if (index >= 0) {
            disassemble_insn (_insn);
            disassemble_insn (_insn);
            PRINTF(" %s", disassembled);
            PRINTF(" %s", disassembled);
          } else
          } else
            PRINTF("<invalid>");
            PRINTF("<invalid>");

powered by: WebSVN 2.1.0

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