|
|
1.1.1.3 root 1: /*
2: * readcpu.h - UAE CPU core
3: *
4: * This file is distributed under the GNU Public License, version 2 or at
5: * your option any later version. Read the file gpl.txt for details.
6: */
1.1 root 7:
1.1.1.3 root 8: #ifndef UAE_READCPU_H
9: #define UAE_READCPU_H
1.1 root 10:
11: #include "sysdeps.h"
1.1.1.2 root 12:
1.1 root 13:
14: ENUMDECL {
15: Dreg, Areg, Aind, Aipi, Apdi, Ad16, Ad8r,
16: absw, absl, PC16, PC8r, imm, imm0, imm1, imm2, immi, am_unknown, am_illg
17: } ENUMNAME (amodes);
18:
19: ENUMDECL {
20: i_ILLG,
21:
22: i_OR, i_AND, i_EOR, i_ORSR, i_ANDSR, i_EORSR,
23: i_SUB, i_SUBA, i_SUBX, i_SBCD,
24: i_ADD, i_ADDA, i_ADDX, i_ABCD,
25: i_NEG, i_NEGX, i_NBCD, i_CLR, i_NOT, i_TST,
26: i_BTST, i_BCHG, i_BCLR, i_BSET,
27: i_CMP, i_CMPM, i_CMPA,
28: i_MVPRM, i_MVPMR, i_MOVE, i_MOVEA, i_MVSR2, i_MV2SR,
29: i_SWAP, i_EXG, i_EXT, i_MVMEL, i_MVMLE,
30: i_TRAP, i_MVR2USP, i_MVUSP2R, i_RESET, i_NOP, i_STOP, i_RTE, i_RTD,
31: i_LINK, i_UNLK,
32: i_RTS, i_TRAPV, i_RTR,
33: i_JSR, i_JMP, i_BSR, i_Bcc,
34: i_LEA, i_PEA, i_DBcc, i_Scc,
35: i_DIVU, i_DIVS, i_MULU, i_MULS,
36: i_ASR, i_ASL, i_LSR, i_LSL, i_ROL, i_ROR, i_ROXL, i_ROXR,
37: i_ASRW, i_ASLW, i_LSRW, i_LSLW, i_ROLW, i_RORW, i_ROXLW, i_ROXRW,
38: i_CHK,i_CHK2,
39: i_MOVEC2, i_MOVE2C, i_CAS, i_CAS2, i_DIVL, i_MULL,
40: i_BFTST,i_BFEXTU,i_BFCHG,i_BFEXTS,i_BFCLR,i_BFFFO,i_BFSET,i_BFINS,
41: i_PACK, i_UNPK, i_TAS, i_BKPT, i_CALLM, i_RTM, i_TRAPcc, i_MOVES,
42: i_FPP, i_FDBcc, i_FScc, i_FTRAPcc, i_FBcc, i_FSAVE, i_FRESTORE,
43: i_CINVL, i_CINVP, i_CINVA, i_CPUSHL, i_CPUSHP, i_CPUSHA, i_MOVE16,
44: i_MMUOP
45: } ENUMNAME (instrmnem);
46:
1.1.1.4 ! root 47: extern const struct mnemolookup {
1.1 root 48: instrmnem mnemo;
49: const char *name;
50: } lookuptab[];
51:
52: ENUMDECL {
53: sz_byte, sz_word, sz_long
54: } ENUMNAME (wordsizes);
55:
56: ENUMDECL {
1.1.1.3 root 57: fa_set, fa_unset, fa_zero, fa_one, fa_dontcare, fa_unknown, fa_isjmp,
58: fa_isbranch
1.1 root 59: } ENUMNAME (flagaffect);
60:
61: ENUMDECL {
62: fu_used, fu_unused, fu_maybecc, fu_unknown, fu_isjmp
63: } ENUMNAME (flaguse);
64:
65: ENUMDECL {
66: bit0, bit1, bitc, bitC, bitf, biti, bitI, bitj, bitJ, bitk, bitK,
1.1.1.3 root 67: bits, bitS, bitd, bitD, bitr, bitR, bitz, bitp, lastbit
1.1 root 68: } ENUMNAME (bitvals);
69:
70: struct instr_def {
71: unsigned int bits;
72: int n_variable;
73: char bitpos[16];
74: unsigned int mask;
75: int cpulevel;
76: int plevel;
77: struct {
78: unsigned int flaguse:3;
79: unsigned int flagset:3;
80: } flaginfo[5];
81: unsigned char sduse;
82: const char *opcstr;
83: };
84:
1.1.1.4 ! root 85: extern const struct instr_def defs68k[];
1.1 root 86: extern int n_defs68k;
87:
88: extern struct instr {
89: long int handler;
90: unsigned char dreg;
91: unsigned char sreg;
92: signed char dpos;
93: signed char spos;
94: unsigned char sduse;
95: int flagdead:8, flaglive:8;
96: unsigned int mnemo:8;
97: unsigned int cc:4;
98: unsigned int plev:2;
99: unsigned int size:2;
100: unsigned int smode:5;
101: unsigned int stype:3;
102: unsigned int dmode:5;
103: unsigned int suse:1;
104: unsigned int duse:1;
105: unsigned int unused1:1;
106: unsigned int clev:3;
1.1.1.3 root 107: unsigned int isjmp:1;
108: unsigned int unused2:4;
1.1 root 109: } *table68k;
110:
111: extern void read_table68k (void);
112: extern void do_merges (void);
113: extern int get_no_mismatches (void);
114: extern int nr_cpuop_funcs;
115:
1.1.1.3 root 116: #endif /* ifndef UAE_READCPU_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.