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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [cpu/] [or32/] [op.c] - Diff between revs 1691 and 1692

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

Rev 1691 Rev 1692
Line 132... Line 132...
}
}
 
 
void enter_dyn_code(oraddr_t addr, struct dyn_page *dp)
void enter_dyn_code(oraddr_t addr, struct dyn_page *dp)
{
{
  uint16_t reg = 0;
  uint16_t reg = 0;
 
  uint32_t t0_reg = t0, t1_reg = t1, t2_reg = t2;
 
  struct cpu_state *cpu_reg = env;
 
 
  addr &= config.immu.pagesize - 1;
  addr &= config.immu.pagesize - 1;
  addr >>= 2;
  addr >>= 2;
 
 
  if(addr)
  if(addr)
Line 151... Line 153...
   * that the value of a global won't be used in a function further up or
   * that the value of a global won't be used in a function further up or
   * further down the stack?? */
   * further down the stack?? */
  if(addr)
  if(addr)
    t2 = cpu_state.reg[(reg >> 10) & 0x1f];
    t2 = cpu_state.reg[(reg >> 10) & 0x1f];
 
 
  or_longjmp(dp->locs[addr]);
  env = &cpu_state;
}
 
 
 
 
  ((gen_code_ent *)dp->locs)[addr]();
 
  t0 = t0_reg;
 
  t1 = t1_reg;
 
  t2 = t2_reg;
 
  env = (struct cpu_state *)cpu_reg;
 
}
 
 
__or_dynop void op_set_pc_pc_delay(void)
__or_dynop void op_set_pc_pc_delay(void)
{
{
  env->sprs[SPR_PPC] = env->pc;
  env->sprs[SPR_PPC] = env->pc;
  /* pc_delay is pulled back 4 since imediatly after this is run, the scheduler
  /* pc_delay is pulled back 4 since imediatly after this is run, the scheduler
Line 183... Line 190...
  env->delay_insn = 1;
  env->delay_insn = 1;
}
}
 
 
__or_dynop void op_do_jump(void)
__or_dynop void op_do_jump(void)
{
{
  do_jump(env->pc);
  RET_FROM_DYN_CODE;
}
}
 
 
__or_dynop void op_do_jump_delay(void)
__or_dynop void op_do_jump_delay(void)
{
{
  do_jump(env->pc_delay);
  env->pc = env->pc_delay;
 
  RET_FROM_DYN_CODE;
}
}
 
 
__or_dynop void op_clear_delay_insn(void)
__or_dynop void op_clear_delay_insn(void)
{
{
  env->delay_insn = 0;
  env->delay_insn = 0;
Line 274... Line 282...
}
}
 
 
__or_dynop void op_nop_reset(void)
__or_dynop void op_nop_reset(void)
{
{
  op_support_nop_reset();
  op_support_nop_reset();
  do_jump(EXCEPT_RESET);
  env->pc = EXCEPT_RESET;
 
  RET_FROM_DYN_CODE;
}
}
 
 
__or_dynop void op_nop_printf(void)
__or_dynop void op_nop_printf(void)
{
{
  op_support_nop_printf();
  op_support_nop_printf();
Line 938... Line 947...
 * instructions are done */
 * instructions are done */
__or_dynop void op_illegal_delay(void)
__or_dynop void op_illegal_delay(void)
{
{
  env->delay_insn = 0;
  env->delay_insn = 0;
  env->sprs[SPR_EEAR_BASE] = env->pc - 4;
  env->sprs[SPR_EEAR_BASE] = env->pc - 4;
  do_jump(EXCEPT_ILLEGAL - 4);
  env->pc = EXCEPT_ILLEGAL - 4;
 
  RET_FROM_DYN_CODE;
}
}
 
 
__or_dynop void op_illegal(void)
__or_dynop void op_illegal(void)
{
{
  env->sprs[SPR_EEAR_BASE] = env->pc;
  env->sprs[SPR_EEAR_BASE] = env->pc;
  do_jump(EXCEPT_ILLEGAL);
  env->pc = EXCEPT_ILLEGAL;
 
  RET_FROM_DYN_CODE;
}
}
 
 
__or_dynop void op_do_sched(void)
__or_dynop void op_do_sched(void)
{
{
  SPEEDY_CALL(do_sched_wrap);
  SPEEDY_CALL(do_sched_wrap);

powered by: WebSVN 2.1.0

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