0
|
1 /*
|
|
2 * instab.h
|
|
3 *
|
|
4 * definitions for the instruction table
|
|
5 */
|
|
6
|
|
7 #include "lwasm.h"
|
|
8
|
|
9 #ifndef __instab_h_seen__
|
|
10 #define __instab_h_seen__
|
|
11
|
|
12 #define INSTYPE_INH 0 /* inherent addressing */
|
|
13 #define INSTYPE_GEN 1 /* general addressing modes */
|
|
14 #define INSTYPE_GEN8 2 /* general addressing, 8 bit immed */
|
|
15 #define INSTYPE_GENNOIMM 3 /* no immediate addressing */
|
|
16 #define INSTYPE_RTOR 4 /* register to register */
|
|
17 #define INSTYPE_RLIST 5 /* register list */
|
|
18 #define INSTYPE_REL8 6 /* relative addressing */
|
|
19 #define INSTYPE_REL16 7 /* 16 bit relative addressing */
|
|
20 #define INSTYPE_INDEX 8 /* indexed mode only */
|
|
21 #define INSTYPE_IMM8 9 /* immediate only 8 bit (andcc, cwai) */
|
|
22 #define INSTYPE_LOGICMEM 10 /* aim/oim/eim/tim */
|
|
23 #define INSTYPE_BITBIT 11 /* bit to bit ops */
|
|
24 #define INSTYPE_TFM 12 /* TFM ops */
|
|
25 #define INSTYPE_GEN32 13 /* general addressing, 32 bit immed */
|
|
26 #define INSTYPE_PSEUDO 14 /* special handling, pseudo op */
|
|
27
|
|
28 #define SPECIAL_EQU 1 /* equ */
|
|
29 #define SPECIAL_ORG 2 /* org */
|
|
30 #define SPECIAL_SETDP 3
|
|
31 #define SPECIAL_FCB 4
|
|
32 #define SPECIAL_FDB 5
|
|
33 #define SPECIAL_FQB 6
|
|
34 #define SPECIAL_FCC 7
|
|
35 #define SPECIAL_FCS 8
|
|
36 #define SPECIAL_FCN 9
|
|
37 #define SPECIAL_RMB 10
|
|
38 #define SPECIAL_ALIGN 11
|
|
39 #define SPECIAL_END 12
|
|
40 #define SPECIAL_INCLUDE 13
|
|
41 #define SPECIAL_ENDM 14
|
|
42 #define SPECIAL_ENDC 15
|
|
43 #define SPECIAL_MACRO 16
|
|
44 #define SPECIAL_COND 17
|
|
45 #define SPECIAL_ELSE 18
|
|
46
|
|
47 typedef struct
|
|
48 {
|
|
49 char *opcode; /* the mneumonic */
|
|
50 int ops[4]; /* opcode values for up to four addr modes */
|
|
51 int instype; /* type of instruction (see above) */
|
|
52 int specialnum; /* type of special instruction */
|
|
53 void (*opfn)(asmstate_t *as, sourceline_t *cl, char **optr);
|
|
54 } instab_t;
|
|
55
|
|
56 #ifndef __instab_c_seen__
|
|
57 extern instab_t instab[];
|
|
58 #endif //__instab_c_seen__
|
|
59
|
|
60 #endif //__instab_h_seen__
|