annotate src/instab.h @ 0:57495da01900

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