mipsy.h
1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*****************************************************************
* mipsy.h
*
* Author: $Author: blythe $
* Date: $Date: 2002/05/29 01:09:10 $
****************************************************************/
#ifndef _MIPSY_H
#define _MIPSY_H
#include "sim_error.h"
#include "simtypes.h"
#include "../shared/cpu_state.h"
/* Global Functions */
extern void MipsyEarlyInit(void);
extern void MipsyInit(void);
extern void MipsyRun(int swtch);
extern void MipsyExit(CPUType exitTo);
extern void MipsyReissueUncachedOp(int cpuNum);
extern void MipsyResetStats(void);
extern SimTime mipsyCurrentTime;
#define MipsyReadTime(_cpu) (mipsyCurrentTime)
/* Macros for dealing with Mipsy's time */
#define MIPSY_ADD_TIME(_cpu, _amt) (MipsyReadTime(_cpu) += _amt)
#define MIPSY_SET_TIME(_cpu, _amt) (MipsyReadTime(_cpu) = _amt)
#include "syslimits.h"
#define MIPSY_MAX_CPUS SIM_MAXCPUS
extern CPUState *PE;
extern CPUState *pePtr[];
/* support for debugging. These definitions are the interface between
* cpu.c (which checks mipsy_break_nexti on each cycle) and simos_interface.c
* (which interacts with simos debugging support).
*/
/* returns nonzero if need to reload from new PC or changed contents of *PC */
extern int MipsyDebug(int cpunum, int is_break_instruction);
extern int mipsy_debug_mode; /* nonzero if debugger enabled */
extern int mipsy_sigusr;
extern int mipsy_break_nexti; /* set to number of cpu to do a breakpoint on,
* or to one of two special values:
*/
#define MIPSY_NOBREAK (-2)
#define MIPSY_BREAKANYCPU (-1)
#endif /* _MIPSY_H */