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 537 and 538

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

Rev 537 Rev 538
Line 264... Line 264...
   Evaluates source operand op_no. */
   Evaluates source operand op_no. */
 
 
unsigned long eval_operand32 (int op_no, int *breakpoint)
unsigned long eval_operand32 (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] & 0x03) {
 
      except_handle (EXCEPT_ALIGN, op[op_no]);
 
      return 0;
 
    }
 
    return eval_mem32 (op[op_no], breakpoint);
    return eval_mem32 (op[op_no], breakpoint);
  }
 
  else if (op[op_no + MAX_OPERANDS] & OPTYPE_REG)
  else if (op[op_no + MAX_OPERANDS] & OPTYPE_REG)
    return eval_reg (op[op_no]);
    return eval_reg (op[op_no]);
  else
  else
    return op[op_no];
    return op[op_no];
}
}
Line 285... Line 280...
unsigned long eval_operand16 (int op_no, int *breakpoint)
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) {
    if (op[op_no] & 0x01) {
      except_handle (EXCEPT_ALIGN, op[op_no]);
 
      return 0;
      return 0;
    }
    }
    return eval_mem16 (op[op_no], breakpoint);
    return eval_mem16 (op[op_no], breakpoint);
  }
  }
  else {
  else {
Line 427... Line 421...
  }
  }
  break_just_hit = 0;
  break_just_hit = 0;
 
 
  instructions++;
  instructions++;
 
 
  /* Added by CZ...catch alignment exception here */
  pc_phy &= ~0x03;
  if(pc_phy & 0x03)
 
    {
 
      except_handle(EXCEPT_ALIGN, 0);
 
      return 0; /* We will fetch exception wrapper at new location.  */
 
    }
 
 
 
#if 0
#if 0
  if(pc_phy > MEMORY_START + MEMORY_LEN)
  if(pc_phy > MEMORY_START + MEMORY_LEN)
    pc_phy %= MEMORY_START + MEMORY_LEN;
    pc_phy %= MEMORY_START + MEMORY_LEN;
#endif 
#endif 

powered by: WebSVN 2.1.0

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