1 |
+ |
#ifndef READCPU_H |
2 |
+ |
#define READCPU_H |
3 |
+ |
|
4 |
|
#ifdef __cplusplus |
5 |
|
extern "C" { |
6 |
|
#endif |
34 |
|
i_BFTST,i_BFEXTU,i_BFCHG,i_BFEXTS,i_BFCLR,i_BFFFO,i_BFSET,i_BFINS, |
35 |
|
i_PACK, i_UNPK, i_TAS, i_BKPT, i_CALLM, i_RTM, i_TRAPcc, i_MOVES, |
36 |
|
i_FPP, i_FDBcc, i_FScc, i_FTRAPcc, i_FBcc, i_FSAVE, i_FRESTORE, |
37 |
< |
i_MMUOP |
37 |
> |
i_CINVL, i_CINVP, i_CINVA, i_CPUSHL, i_CPUSHP, i_CPUSHA, i_MOVE16, |
38 |
> |
i_MMUOP, |
39 |
> |
i_EMULOP_RETURN, i_EMULOP |
40 |
|
} ENUMNAME (instrmnem); |
41 |
|
|
42 |
|
extern struct mnemolookup { |
57 |
|
} ENUMNAME (flaguse); |
58 |
|
|
59 |
|
ENUMDECL { |
60 |
+ |
fl_normal = 0, |
61 |
+ |
fl_branch = 1, |
62 |
+ |
fl_jump = 2, |
63 |
+ |
fl_return = 3, |
64 |
+ |
fl_trap = 4, |
65 |
+ |
fl_const_jump = 8, |
66 |
+ |
|
67 |
+ |
/* Instructions that can trap don't mark the end of a block */ |
68 |
+ |
fl_end_block = 3 |
69 |
+ |
} ENUMNAME (cflow_t); |
70 |
+ |
|
71 |
+ |
ENUMDECL { |
72 |
|
bit0, bit1, bitc, bitC, bitf, biti, bitI, bitj, bitJ, bitk, bitK, |
73 |
< |
bits, bitS, bitd, bitD, bitr, bitR, bitz, lastbit |
73 |
> |
bits, bitS, bitd, bitD, bitr, bitR, bitz, bitE, bitp, lastbit |
74 |
|
} ENUMNAME (bitvals); |
75 |
|
|
76 |
|
struct instr_def { |
84 |
|
unsigned int flaguse:3; |
85 |
|
unsigned int flagset:3; |
86 |
|
} flaginfo[5]; |
87 |
+ |
unsigned char cflow; |
88 |
|
unsigned char sduse; |
89 |
|
const char *opcstr; |
90 |
|
}; |
103 |
|
unsigned int mnemo:8; |
104 |
|
unsigned int cc:4; |
105 |
|
unsigned int plev:2; |
88 |
– |
#ifdef sgi |
106 |
|
wordsizes size:2; |
107 |
|
amodes smode:5; |
108 |
|
unsigned int stype:3; |
109 |
|
amodes dmode:5; |
93 |
– |
#else |
94 |
– |
unsigned int size:2; |
95 |
– |
unsigned int smode:5; |
96 |
– |
unsigned int stype:3; |
97 |
– |
unsigned int dmode:5; |
98 |
– |
#endif |
110 |
|
unsigned int suse:1; |
111 |
|
unsigned int duse:1; |
112 |
|
unsigned int unused1:1; |
113 |
|
unsigned int clev:3; |
114 |
< |
unsigned int unused2:5; |
114 |
> |
unsigned int cflow:3; |
115 |
> |
unsigned int unused2:2; |
116 |
|
} *table68k; |
117 |
|
|
118 |
|
extern void read_table68k (void); |
120 |
|
extern int get_no_mismatches (void); |
121 |
|
extern int nr_cpuop_funcs; |
122 |
|
|
123 |
+ |
extern const char *get_instruction_name (unsigned int opcode); |
124 |
+ |
extern const char *get_instruction_string (unsigned int opcode); |
125 |
+ |
|
126 |
|
#ifdef __cplusplus |
127 |
|
} |
128 |
|
#endif |
129 |
+ |
|
130 |
+ |
#endif /* READCPU_H */ |