o Implement generic halt/restart/abort module.
[deliverable/binutils-gdb.git] / sim / tic80 / sim-main.h
1 /* This file is part of the program psim.
2
3 Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
4 Copyright (C) 1997, Free Software Foundation
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 */
21
22
23 #ifndef _SIM_MAIN_H_
24 #define _SIM_MAIN_H_
25
26 #include "sim-basics.h"
27
28 #include <signal.h>
29
30 /* These are generated files. */
31 #include "itable.h"
32 #include "idecode.h"
33 #include "idecode.h"
34
35 typedef instruction_address sim_cia;
36 static const sim_cia null_cia = {0}; /* Dummy */
37 #define NULL_CIA null_cia
38
39 #include "sim-base.h"
40
41 #include "alu.h"
42 #include "cpu.h"
43
44
45 struct sim_state {
46
47 /* escape route for inner functions */
48 int halt_ok;
49 jmp_buf path_to_halt;
50 int restart_ok;
51 jmp_buf path_to_restart;
52
53 /* status from last halt */
54 enum sim_stop reason;
55 int siggnal;
56
57 /* the processors proper */
58 sim_cpu cpu;
59 #define STATE_CPU(sd, n) (&(sd)->cpu)
60
61 /* The base class. */
62 sim_state_base base;
63
64 };
65
66 /* (re) initialize the simulator */
67
68 extern void engine_init
69 (SIM_DESC sd);
70
71
72 #endif
This page took 0.030398 seconds and 4 git commands to generate.