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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_68/] [or1ksim/] [cpu/] [common/] [execute.h] - Blame information for rev 1462

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 cvs
/* execute.h -- Header file for architecture dependent execute.c
2
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20 1452 nogj
#if DYNAMIC_EXECUTION
21
#include "dyn_rec.h"
22
#endif
23
 
24 1432 nogj
struct cpu_state {
25
  /* General purpose registers. */
26
  uorreg_t reg[MAX_GPRS];
27
 
28
  /* Sprs */
29
  uorreg_t sprs[MAX_SPRS];
30
 
31
  /* Effective address of instructions that have an effective address.  This is
32
   * only used to get dump_exe_log correct */
33
  oraddr_t insn_ea;
34
 
35
  /* Is current instruction in execution in a delay slot? */
36
  int delay_insn;
37
 
38
  /* Program counter (and translated PC) */
39
  oraddr_t pc;
40
 
41
  /* Delay instruction effective address register */
42
  oraddr_t pc_delay;
43
 
44
  /* Decoding of the just executed instruction.  Only used in analysis(). */
45
  struct iqueue_entry iqueue;
46
 
47
  /* decoding of the instruction that was executed before this one.  Only used
48
   * in analysis(). */
49
  struct iqueue_entry icomplet;
50 1452 nogj
 
51
#if DYNAMIC_EXECUTION
52
  /* Current page in execution */
53
  struct dyn_page *curr_page;
54
 
55
  /* Linked list of recompiled pages with their status */
56
  struct dyn_page *dyn_pages;
57
 
58
  /* Micro operation queue.  Only used to speed up recompile_page */
59
  struct op_queue *opqs;
60
 
61
  /* Cross references that reference the jumps from the infinite loop
62
   * instruction (l.j 0) */
63
  struct x_ref *inf_xrefs;
64
 
65
  /* rfe cross-reference cache */
66
  struct x_ref **rfe_held_xrefs;
67
  unsigned int rfe_held_xref_pos;
68
 
69
  /* Set if all temporaries are stored */
70
  int ts_current;
71
 
72
  /* The contents of the temporaries.  Only used in except_handle */
73
  uorreg_t t0;
74
  uorreg_t t1;
75
  uorreg_t t2;
76
#endif
77 1432 nogj
};
78
 
79
extern struct cpu_state cpu_state;
80
 
81 50 lampret
#define CURINSN(INSN) (strcmp(cur->insn, (INSN)) == 0)
82
 
83 138 markom
/*extern machword eval_operand(char *srcoperand,int* breakpoint);
84
extern void set_operand(char *dstoperand, unsigned long value,int* breakpoint);*/
85 560 markom
void dumpreg();
86
inline void dump_exe_log();
87
inline int cpu_clock ();
88
void cpu_reset ();
89 1350 nogj
uorreg_t evalsim_reg(unsigned int regno);
90 1434 nogj
void setsim_reg(unsigned int regno, uorreg_t value);
91 2 cvs
 
92 1350 nogj
extern oraddr_t pcnext;
93 1308 phoenix
int depend_operands(struct iqueue_entry *prev, struct iqueue_entry *next);

powered by: WebSVN 2.1.0

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