|
|
1.1 root 1: /*
2: * static char *dish_ID[] = "@(#) dis.h: 1.3 12/14/83";
3: */
4:
5: /*
6: * This is the header file for the m32A disassembler.
7: * The information contained in the first part of the file
8: * is common to each version, while the last part is dependent
9: * on the particular machine architecture being used.
10: */
11:
12: #define NCPS 10 /* number of chars per symbol */
13: #define NHEX 80 /* max # chars in object per line */
14: #define NLINE 80 /* max # chars in mnemonic per line */
15: #define FAIL 0
16: #define TRUE 1
17: #define FALSE 0
18: #define LEAD 1
19: #define NOLEAD 0
20: #define TERM 0 /* used in tables.c to indicate */
21: /* that the 'indirect' field of the */
22: /* 'instable' terminates - no pointer. */
23: /* Is also checked in 'dis_text()' in */
24: /* bits.c. */
25:
26: #ifdef AR32W
27: #define LNNOBLKSZ 1024 /* size of blocks of line numbers */
28: #define SYMBLKSZ 1024 /* size if blocks of symbol table entries */
29: #else
30: #define LNNOBLKSZ 512 /* size of blocks of line numbers */
31: #define SYMBLKSZ 512 /* size of blocks of symbol table entries */
32: #endif
33: #define STRNGEQ 0 /* used in string compare operation */
34: /* in 'disassembly' routine */
35:
36: /*
37: * The following are constants that are used in the disassembly
38: * of floating point immediate operands.
39: */
40: #define NOTFLOAT 0
41: #define FPSINGLE 1
42: #define FPDOUBLE 2
43: #define TWO_23 8388608 /* 2 ** 23 used in conversion
44: * of floating point object to
45: * a decimal number in _utls.c
46: */
47: #define TWO_32 4294967296. /* 2 ** 32 also used in floating
48: * point number conversion in
49: * _utls.c
50: */
51: #define TWO_52 4503599627370496. /* 2 ** 52 also used in
52: * floating point conversion
53: * routines.
54: */
55:
56: #define BIAS 127 /* bias on 8 bit exponent of floating
57: * point number in _utls.c
58: */
59: #define DBIAS 1023 /* bias on 11 bit exponent of double
60: * precision floating point number
61: * in _utls.c
62: */
63:
64: /*
65: * The following are the 7 posssible types of floating point immediate
66: * operands. These are the possible values of [s|d]fpconv() which
67: * are in _utls.c.
68: */
69:
70: #define NOTANUM 0
71: #define NEGINF 1
72: #define INFINITY 2
73: #define ZERO 3
74: #define NEGZERO 4
75: #define FPNUM 5
76: #define FPBIGNUM 6
77:
78: /*
79: * This is the structure that will be used for storing all the
80: * op code information. The structure values themselves are
81: * in 'tables.c'.
82: */
83:
84: struct instable {
85: char name[NCPS];
86: unsigned class;
87: };
88: /*
89: * This is the structure that will be used for storing all the
90: * address modification information. The structure values
91: * themselves are in 'tables.c'.
92: */
93: struct formtable {
94: char name[NCPS];
95: unsigned typ;
96: };
97: /* NOTE: the following information in this file must be changed
98: * between the different versions of the disassembler.
99: *
100: * These are the instruction classes as they appear in
101: * 'tables.c'. Here they are given numerical values
102: * for use in the actual disassembly of an object file.
103: */
104:
105: #define UNKNOWN 0
106: #define OPRNDS0 1 /* instructions with no operands */
107: #define OPRNDS1 2 /* instructions with 1 operand */
108: #define OPRNDS2 3 /* instructions with 2 operands */
109: #define OPRNDS3 4 /* instructions with 3 operands */
110: #define OPRNDS4 5 /* instructions with 4 operands */
111: #define JUMP 6 /* "jump" instruction */
112: #define JUMPSB 7 /* "jumpsb" instruction */
113: #define JUMP1 8 /* 1 byte offset jump instruction */
114: #define JUMP2 9 /* 2 byte offset jump instruction */
115: #define BSBB 10 /* "BSBB" instruction */
116: #define BSBH 11 /* "BSBB" instruction */
117: #define NOOP8 12 /* 8 bit offset (no operands) */
118: #define NOOP16 13 /* 16 bit offset (no operands) */
119: #define CALL 14 /* "call" instruction */
120: #define EXT 15 /* "extendop" instruction */
121: #define AD1OP3 17 /* 4 operands but add 1 to 3nd operand! */
122: #define SFPOPS2 18 /* single floating point, 2 operands */
123: #define SFPOPS3 19 /* single floating point, 3 operands */
124: #define MACRO 20 /* macro-rom instruction */
125: #define DFPOPS2 21 /* double floating point, 2 operands */
126: #define DFPOPS3 22 /* double floating point, 3 operands */
127: #define SPRTOP0 23 /* support processor inst. 0 operands */
128: #define SPRTOP1 24 /* support processor inst. 1 operand */
129: #define SPRTOP2 25 /* support processor inst. 2 operands */
130:
131: /*
132: * These are the address modification types as they appear in
133: * 'tables.c'. Here they are given numerical values for
134: * use in the actual disassembly of an object file.
135: */
136:
137:
138: #define IM6 1 /* immediate 6 bit field */
139: #define R 2 /* register */
140: #define RDF 3 /* register deferred (indirect) */
141: #define R4 4 /* register and 4 bit displacement */
142: #define IMB 5 /* immediate byte */
143: #define IMH 6 /* immediate half word */
144: #define IMW 7 /* immediate word */
145: #define BDB 8 /* base (register) and byte displacement */
146: #define BDH 9 /* base (register) and half word displacement */
147: #define BDW 10 /* base (register) and word displacement */
148: #define BDBDF 11 /* base and byte displacement deferred */
149: #define BDHDF 12 /* base and half word displacement deferred */
150: #define BDWDF 13 /* base and word displacement deferred */
151: #define EXPSB 14 /* expanded signed byte */
152: #define EXPUB 15 /* expanded unsigned byte */
153: #define EXPSH 16 /* expanded signed half word */
154: #define EXPUH 17 /* expanded unsigned half word */
155: #define EXPSW 18 /* expanded signed word */
156: #define EXPUW 19 /* expanded unsigned word */
157: #define IM4 20 /* immediate 4 bit field */
158: #define ABAD 21 /* absolute address */
159: #define ABADDF 22 /* absolute address deferred */
160: #define IMD 23 /* immediate double (floating point) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.