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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [or1k/] [except.c] - Diff between revs 599 and 693

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

Rev 599 Rev 693
Line 57... Line 57...
    pending.address = ea;
    pending.address = ea;
    if (delay_insn)
    if (delay_insn)
      pending.saved = pc - 4;
      pending.saved = pc - 4;
    else
    else
      pending.saved = pc;
      pending.saved = pc;
    printf("Exception 0x%x (%s): insn_addr 0x%x, EA 0x%x, pc: 0x%x, pcnext: 0x%x\n",
    if (config.sim.verbose) printf("Exception 0x%x (%s) at 0x%x, EA: 0x%x, pc: 0x%x, pcnext: 0x%x\n",
      except, EXCEPT_NAME(except), iqueue[0].insn_addr, ea, pc, pcnext);
      except, EXCEPT_NAME(except), iqueue[0].insn_addr, ea, pc, pcnext);
  }
  }
}
}
 
 
/* Actually handles exception */
/* Actually handles exception */
Line 71... Line 71...
  fprintf(stderr, "WARNING: No exception processing while ONLY_VIRTUAL_MACHINE is defined.\n");
  fprintf(stderr, "WARNING: No exception processing while ONLY_VIRTUAL_MACHINE is defined.\n");
  cont_run = 0;
  cont_run = 0;
#else
#else
 
 
  if (delay_insn) {
  if (delay_insn) {
    printf("INFO: Exception during execution of delay slot insn.\n");
    if (config.sim.verbose) printf("INFO: Exception during execution of delay slot insn.\n");
    pc -= 4;
    pc -= 4;
  }
  }
#if 0
 
  if ((pcnext != (pc + 4)) && (except != EXCEPT_ITLBMISS)) {  /* Always execute delay slot insn */
 
    printf("XXXXXXXXXXXXXX\n");
 
    fetch();            /* before starting with exception */
 
    decode(&iqueue[0]);         /* (itlbmiss is special case) */
 
    execute();
 
  }
 
#endif
 
 
 
  pc_saved = pc & ~0x3;
  pc_saved = pc & ~0x3;
  if (except == EXCEPT_ILLEGAL)
  if (except == EXCEPT_ILLEGAL)
    mtspr(SPR_EPCR_BASE, pending.saved);
    mtspr(SPR_EPCR_BASE, pending.saved);
  else if (except == EXCEPT_ALIGN)
  else if (except == EXCEPT_ALIGN)

powered by: WebSVN 2.1.0

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