8 typedef struct Registers Registers;
9 typedef struct Segment Segment;
10 typedef struct Memory Memory;
11 typedef struct Mul Mul;
12 typedef struct Mulu Mulu;
13 typedef struct Inst Inst;
14 typedef struct Icache Icache;
15 typedef struct Tlb Tlb;
16 typedef struct Breakpoint Breakpoint;
29 int type; /* Instruction/Read/Access/Write/Equal */
30 ulong addr; /* Place at address */
31 int count; /* To execute count times or value */
32 int done; /* How many times passed through */
33 Breakpoint* next; /* Link to next one */
56 int on; /* Being updated */
57 int tlbsize; /* Number of entries */
58 ulong tlbent[Nmaxtlb]; /* Virtual address tags */
59 int hit; /* Number of successful tag matches */
60 int miss; /* Number of failed tag matches */
65 int on; /* Turned on */
66 int linesize; /* Line size in bytes */
67 int stall; /* Cache stalls */
68 int* lines; /* Tag array */
69 int* (*hash)(ulong); /* Hash function */
70 char* hashtext; /* What the function looks like */
145 void Ssyscall(ulong);
147 void breakpoint(char*, char*);
148 void brkchk(ulong, int);
155 void* emalloc(ulong);
156 void* erealloc(void*, ulong, ulong);
158 void fatal(int, char*, ...);
159 ulong getmem_2(ulong);
160 ulong getmem_4(ulong);
161 uchar getmem_b(ulong);
162 ushort getmem_h(ulong);
163 uvlong getmem_v(ulong);
164 ulong getmem_w(ulong);
167 void initicache(void);
169 void initstk(int, char**);
172 void itrace(char*, ...);
174 char* memio(char*, ulong, int, int);
175 int _mipscoinst(Map*, ulong, char*, int);
177 Mulu mulu(ulong, ulong);
179 void printlocals(Symbol*, ulong);
180 void printparams(Symbol*, ulong);
181 void printsource(long);
183 void putmem_b(ulong, uchar);
184 void putmem_h(ulong, ushort);
185 void putmem_v(ulong, uvlong);
186 void putmem_w(ulong, ulong);
193 void updateicache(ulong addr);
197 EXTERN Registers reg;
198 EXTERN Memory memory;
205 EXTERN Icache icache;
208 EXTERN jmp_buf errjmp;
209 EXTERN Breakpoint* bplist;
216 EXTERN Biobuf* bioout;
222 /* Plan9 Kernel constants */
228 STACKTOP = 0x80000000,
233 SIGNBIT = 0x80000000,