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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [or32/] [execute.c] - Diff between revs 560 and 574

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

Rev 560 Rev 574
Line 307... Line 307...
 
 
static unsigned long eval_operand16 (int op_no, int *breakpoint)
static unsigned long eval_operand16 (int op_no, int *breakpoint)
{
{
  debug (9, "%i %08X\n", op_no, op[op_no + MAX_OPERANDS]);
  debug (9, "%i %08X\n", op_no, op[op_no + MAX_OPERANDS]);
  if (op[op_no + MAX_OPERANDS] & OPTYPE_DIS) {
  if (op[op_no + MAX_OPERANDS] & OPTYPE_DIS) {
    if (op[op_no] & 0x01) {
 
      return 0;
 
    }
 
    return eval_mem16 (op[op_no], breakpoint);
    return eval_mem16 (op[op_no], breakpoint);
  }
  }
  else {
  else {
    fprintf (stderr, "Invalid operand type.\n");
    fprintf (stderr, "Invalid operand type.\n");
    exit (1);
    exit (1);
Line 361... Line 358...
void set_operand16(int op_no, unsigned long value, int* breakpoint)
void set_operand16(int op_no, unsigned long value, int* breakpoint)
{
{
  /* Mark this as destination operand.  */
  /* Mark this as destination operand.  */
  op[op_no + MAX_OPERANDS] |= OPTYPE_DST;
  op[op_no + MAX_OPERANDS] |= OPTYPE_DST;
  if (op[op_no + MAX_OPERANDS] & OPTYPE_DIS) {
  if (op[op_no + MAX_OPERANDS] & OPTYPE_DIS) {
     if (op[op_no] & 0x01) {
 
      except_handle (EXCEPT_ALIGN, op[op_no]);
 
      return;
 
    }
 
    set_mem16(op[op_no], value, breakpoint);
    set_mem16(op[op_no], value, breakpoint);
  }
  }
  else
  else
    {
    {
      fprintf (stderr, "Invalid operand type.\n");
      fprintf (stderr, "Invalid operand type.\n");
Line 399... Line 392...
{
{
  struct mem_entry *entry;
  struct mem_entry *entry;
  debug(5, "fetch()\n");
  debug(5, "fetch()\n");
 
 
  /* Update the pc for pending exceptions, or get physical pc */
  /* Update the pc for pending exceptions, or get physical pc */
 
  if (!pending.valid)
 
    pc_phy = translate_vrt_to_phy_add(pc);
 
 
  if(pending.valid)
  if(pending.valid)
    except_handle_backend(pending.type, pending.address, pending.saved);
    except_handle_backend(pending.type, pending.address, pending.saved);
  else
 
    pc_phy = translate_vrt_to_phy_add(pc);
 
 
 
  if (CHECK_BREAKPOINTS) {
  if (CHECK_BREAKPOINTS) {
    /* MM: Check for breakpoint.  This has to be done in fetch cycle,
    /* MM: Check for breakpoint.  This has to be done in fetch cycle,
       because of peripheria.
       because of peripheria.
       MM1709: if we cannot access the memory entry, we could not set the
       MM1709: if we cannot access the memory entry, we could not set the

powered by: WebSVN 2.1.0

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