tc.h
1.4 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
/*
* 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.
*
*/
/****************************************************************
* tc.h - Translation cache
*
*
* $Author: blythe $
* $Date: 2002/05/29 01:09:09 $
*****************************************************************/
#ifndef TC_H
#define TC_H
#ifndef _LANGUAGE_ASSEMBLY
/* ****************************************************************
* Translation Cache Address
* ****************************************************************/
#ifdef SIM_ALPHA
#include <alpha/inst.h>
typedef union alpha_instruction * TCA;
#else
typedef Inst * TCA;
#endif
#define TCFLUSH_ALL -1
#define TC_MAX_CACHES 4
/*
* The functions operating on the Tc
*/
extern int tcGenNumber;
extern void TC_init (int numCaches, int size[], int pctcSize[], int annotationSize[], Inst breakOp );
extern void TC_flush (int cache);
extern TCA TC_GetTCPtr (int cache);
extern void TC_SetTCNext(int cache,TCA, TCA );
extern int TC_Is_Room (int len, int cache );
extern int TC_InTC (int cache,TCA addr );
extern void TC_IncrementSize(int cache, int length);
extern void TC_PCInsert (int code, TCA tca, VA vAddr, MA mAddr);
extern TCA TC_PCLookup (int code, VA vAddr, MA mAddr);
#endif /* LANGUAGE_ASSEMBLY */
#endif /* TC_H */