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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_66/] [or1ksim/] [cpu/] [or32/] [execute.c] - Diff between revs 1446 and 1452

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

Rev 1446 Rev 1452
Line 149... Line 149...
}
}
 
 
/* Implementation specific.
/* Implementation specific.
   Evaluates source operand opd. */
   Evaluates source operand opd. */
 
 
static uorreg_t eval_operand_val(uint32_t insn, struct insn_op_struct *opd)
#if !(DYNAMIC_EXECUTION)
 
static
 
#endif
 
uorreg_t eval_operand_val(uint32_t insn, struct insn_op_struct *opd)
{
{
  unsigned long operand = 0;
  unsigned long operand = 0;
  unsigned long sbit;
  unsigned long sbit;
  unsigned int nbits = 0;
  unsigned int nbits = 0;
 
 
Line 576... Line 579...
 
 
#ifndef HAS_EXECUTION
#ifndef HAS_EXECUTION
#error HAS_EXECUTION has to be defined in order to execute programs.
#error HAS_EXECUTION has to be defined in order to execute programs.
#endif
#endif
 
 
 
  /* FIXME: Most of this file is not needed with DYNAMIC_EXECUTION */
 
#if !(DYNAMIC_EXECUTION)
  decode_execute (current);
  decode_execute (current);
 
#endif
 
 
#if SET_OV_FLAG
#if SET_OV_FLAG
  /* Check for range exception */
  /* Check for range exception */
  if (testsprbits (SPR_SR, SPR_SR_OVE) && testsprbits (SPR_SR, SPR_SR_OV))
  if (testsprbits (SPR_SR, SPR_SR_OVE) && testsprbits (SPR_SR, SPR_SR_OV))
    except_handle (EXCEPT_RANGE, mfspr(SPR_EEAR_BASE));
    except_handle (EXCEPT_RANGE, mfspr(SPR_EEAR_BASE));
Line 642... Line 648...
  if (config.sim.verbose) PRINTF ("Starting at 0x%"PRIxADDR"\n", pcnext);
  if (config.sim.verbose) PRINTF ("Starting at 0x%"PRIxADDR"\n", pcnext);
  cpu_state.pc = pcnext;
  cpu_state.pc = pcnext;
  pcnext += 4;
  pcnext += 4;
  debug(1, "reset ...\n");
  debug(1, "reset ...\n");
 
 
 
#if DYNAMIC_EXECUTION
 
  cpu_state.ts_current = 1;
 
#endif
 
 
  /* MM1409: All programs should set their stack pointer!  */
  /* MM1409: All programs should set their stack pointer!  */
  except_handle(EXCEPT_RESET, 0);
  except_handle(EXCEPT_RESET, 0);
  update_pc();
  update_pc();
  except_pending = 0;
  except_pending = 0;
}
}
Line 686... Line 696...
void l_invalid () {
void l_invalid () {
#endif
#endif
  except_handle(EXCEPT_ILLEGAL, cpu_state.iqueue.insn_addr);
  except_handle(EXCEPT_ILLEGAL, cpu_state.iqueue.insn_addr);
}
}
 
 
#if !SIMPLE_EXECUTION
#if COMPLEX_EXECUTION
 
 
/* Include decode_execute function */
/* Include decode_execute function */
#include "execgen.c"
#include "execgen.c"
 
 
#else /* SIMPLE_EXECUTION */
#elif SIMPLE_EXECUTION
 
 
 
 
#define INSTRUCTION(name) void name (struct iqueue_entry *current)
#define INSTRUCTION(name) void name (struct iqueue_entry *current)
 
 
/* Implementation specific.
/* Implementation specific.
Line 797... Line 807...
#define PARAM1 eval_operand(1, current->insn_index, current->insn)
#define PARAM1 eval_operand(1, current->insn_index, current->insn)
#define PARAM2 eval_operand(2, current->insn_index, current->insn)
#define PARAM2 eval_operand(2, current->insn_index, current->insn)
 
 
#include "insnset.c"
#include "insnset.c"
 
 
#endif /* !SIMPLE_EXECUTION */
#elif defined(DYNAMIC_EXECUTION)
 
 
 
#else
 
# error "One of SIMPLE_EXECUTION/COMPLEX_EXECUTION must be defined"
 
#endif
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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